]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/file-path.hh
2003 -> 2004
[lilypond.git] / flower / include / file-path.hh
index 898bb3939fb2291c4c17cd463717e8f92bcfd6df..40579d00feae289fa0a280b739f9a6016c45b45c 100644 (file)
@@ -1,13 +1,14 @@
 /*
-  path.hh -- declare File_path
+  file-path.hh -- declare Path and File_path
 
   source file of the Flower Library
 
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#ifndef PATH_HH
-#define PATH_HH
+#ifndef FILE_PATH_HH
+#define FILE_PATH_HH
+
 #include "string.hh"
 #include "array.hh"
 
@@ -19,8 +20,6 @@
    Search a number of dirs for a file.
 
    TODO: add a unix style PATH interface 
-   Should use kpathsea?
-   
 */
 
 class Path
@@ -31,7 +30,7 @@ public:
   String base;
   String ext;
 
-  String path () const;
+  String to_string () const;
 };
 
 class File_path : private Array<String>
@@ -40,19 +39,13 @@ public:
   String find (String nm) const;
 
   Array<String>::push;
-  String str ()const;
+  void prepend (String str) { Array<String>::insert (str, 0); }
+  String to_string ()const;
   bool try_add (String str);
   void add (String);
   void parse_path (String);
 };
 
-/** split a path into its components.
-
-  @params path
-
-  @return
-  String &drive, String &dirs, String &filebase, String &extension
- */
 Path split_path (String path);
 
-#endif
+#endif /* FILE_PATH */