LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
file-library.hh
Go to the documentation of this file.
1
6
#ifndef MISC_FILE_LIBRARY_HH
7
# define MISC_FILE_LIBRARY_HH
8
9
# include <string>
10
# include <list>
11
# include <
misc/path.hh
>
12
13
namespace
misc
14
{
19
class
file_library
20
{
21
public
:
25
file_library
();
27
file_library
(
path
p);
29
32
void
append_dir
(
path
p);
33
void
prepend_dir
(
path
p);
35
38
void
push_current_directory
(
path
p);
39
void
pop_current_directory
();
40
path
current_directory_get
()
const
;
42
45
51
path
find_file
(
const
std::string& file);
52
54
bool
find_in_directory
(
const
path
& dir,
const
std::string& file)
const
;
56
59
std::ostream&
dump
(std::ostream& ostr)
const
;
61
62
private
:
64
void
push_cwd
();
65
69
path
find_in_search_path
(
const
path
& relative_path,
70
const
std::string&
filename
)
const
;
71
74
void
append_dir_list
(std::string path_list);
75
78
path
ensure_absolute_path
(
path
p)
const
;
79
80
typedef
std::list<path>
path_list_type
;
81
83
path_list_type
search_path_
;
84
86
path_list_type
current_directory_
;
87
};
88
89
std::ostream&
90
operator<<
(std::ostream& ostr,
const
file_library
&
l
);
91
92
std::string
basename
(
const
std::string& file);
93
path
basedir
(
const
std::string& file);
94
bool
file_exists
(
const
std::string& file);
95
96
}
97
98
# include <
misc/file-library.hxx
>
99
100
#endif // !MISC_FILE_LIBRARY_HH
misc
file-library.hh
Generated on Wed Mar 5 2014 15:47:36 for LRDE Tiger Compiler by
1.8.1.2