]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/file-path.hh
release: 1.1.29
[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--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #ifndef PATH_HH
10 #define PATH_HH
11 #include "string.hh"
12 #include "array.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   String str ()const;
35   void add (String str);
36   void parse_path (String);
37 };
38
39 /** split a path into its components.
40
41   @params path
42
43   @return
44   String &drive, String &dirs, String &filebase, String &extension
45  */
46 void split_path (String path, String &drive, String &dirs, String &filebase, String &extension);
47
48 #endif