MCPcopy Create free account
hub / github.com/davisking/dlib / directory

Class directory

dlib/dir_nav/dir_nav_kernel_2.h:157–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155// ----------------------------------------------------------------------------------------
156
157 class directory
158 {
159 /*!
160 INITIAL VALUES
161 state.name == name()
162 state.full_name == full_name()
163
164 CONVENTION
165 state.name == name()
166 state.full_name == full_name()
167 is_root() == state.name.size() == 0
168
169 !*/
170
171 void init(const std::string& name);
172
173 public:
174 struct private_constructor{};
175 inline directory (
176 const std::string& name,
177 const std::string& full_name,
178 private_constructor
179 )
180 {
181 state.name = name;
182 state.full_name = full_name;
183 }
184
185 struct data
186 {
187 std::string name;
188 std::string full_name;
189 };
190
191 class dir_not_found : public error {
192 public: dir_not_found(const std::string& s):error(s){}
193 };
194 class listing_error : public error {
195 public: listing_error(const std::string& s):error(s){}
196 };
197
198 inline directory (
199 )
200 {
201 }
202
203 directory (
204 const std::string& name
205 ) { init(name); }
206
207 directory (
208 const char* name
209 ) { init(name); }
210
211 static char get_separator (
212 );
213
214 template <

Callers 3

get_parent_directoryFunction · 0.70
load_objects_listFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected