2 file-path.hh -- declare File_path
4 source file of the Flower Library
6 (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
13 #include "std-string.hh"
16 search in directories for a file.
18 Abstraction of PATH variable. An interface for searching input files.
19 Search a number of dirs for a file.
21 TODO: add a unix style PATH interface
26 Array<Std_string> dirs_;
28 Array<Std_string> directories () const;
29 Std_string find (Std_string name) const;
30 Std_string find (Std_string name, char const *extensions[]);
31 Std_string to_string () const;
32 bool try_append (Std_string str);
33 void append (Std_string str);
34 void parse_path (Std_string);
35 void prepend (Std_string str);
38 bool is_file (Std_string file_name);
39 bool is_dir (Std_string file_name);
41 #endif /* FILE_PATH */