path.hpp
Go to the documentation of this file.
1#ifndef PATH_UTIL
2#define PATH_UTIL
3
4
5#include <string>
6namespace ecl {
7 namespace util {
8 namespace path {
9 /*
10 Observe that these functions are purely based on string inspection; i.e.
11 the actual filesystem is *never* consulted. Furthermore the functions
12 interpret the argument as a *filename* - that implies the (maybe
13 surprising) semantics:
14
15 dirname("/tmp") => "/"
16 basename("/tmp") => "tmp"
17
18 Although if you actually checked the filesystem you would of course
19 discover that /tmp actually is a directory. This is the same behaviour
20 as the os.path.dirname() and os.path.basename() functions in the Python
21 library.
22 */
23
27 }
28 }
29}
30
31
32#endif
const char *const string
Definition: cJSON.h:170
std::string basename(const std::string &fname)
std::string extension(const std::string &fname)
std::string dirname(const std::string &fname)
Definition: ecl_box.hpp:26