]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/file-path.hh
release: 1.1.52
[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   String find (String nm) const;
30
31   Array<String>::push;
32   String str ()const;
33   void add (String str);
34   void parse_path (String);
35 };
36
37 /** split a path into its components.
38
39   @params path
40
41   @return
42   String &drive, String &dirs, String &filebase, String &extension
43  */
44 void split_path (String path, String &drive, String &dirs, String &filebase, String &extension);
45
46 #endif