2 file-path.hh -- declare File_path
4 source file of the Flower Library
6 (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
12 #include "std-vector.hh"
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 std::vector<std::string> dirs_;
29 std::vector<std::string> directories () const;
30 std::string find (std::string name) const;
31 std::string find (std::string name, char const *extensions[]);
32 std::string to_string () const;
33 bool try_append (std::string str);
34 void append (std::string str);
35 void parse_path (std::string);
36 void prepend (std::string str);
39 bool is_file (std::string file_name);
40 bool is_dir (std::string file_name);
42 #endif /* FILE_PATH */