]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/file-path.hh
release: 0.1.61
[lilypond.git] / flower / include / file-path.hh
1 /*
2   path.hh -- declare File_path
3
4   source file of the Flower Library
5
6   (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9 #ifndef PATH_HH
10 #define PATH_HH
11 #include "string.hh"
12 #include "varray.hh"
13
14
15 /**    
16   search in directories for a file.
17
18    Abstraction of PATH variable. An interface for searching input files.
19    Search a number of dirs for a file.
20
21    TODO: add a unix style PATH interface 
22    Should use kpathsea?
23    
24 */
25
26 class File_path : private Array<String>
27 {
28 public:
29   /// locate a file in the search path
30   String find (String nm) const;
31
32   /// add to end of path.
33   Array<String>::push;
34   void add (String str);
35   void parse_path (String);
36 };
37
38 /** split a path into its components.
39
40   @params path
41
42   @return
43   String &drive, String &dirs, String &filebase, String &extension
44  */
45 void split_path (String path, String &drive, String &dirs, String &filebase, String &extension);
46
47 #endif