1 #ifndef BLANK_IO_FILESYSTEM_HPP_
2 #define BLANK_IO_FILESYSTEM_HPP_
9 /// check if give path points to an existing directory
10 bool is_dir(const char *);
11 inline bool is_dir(const std::string &s) {
12 return is_dir(s.c_str());
14 /// check if give path points to an existing file
15 bool is_file(const char *);
16 inline bool is_file(const std::string &s) {
17 return is_file(s.c_str());
20 /// create given directory
21 /// @return true if the directory was created
22 /// the directory might already exist, see errno
23 bool make_dir(const char *);
24 inline bool make_dir(const std::string &s) {
25 return make_dir(s.c_str());
27 /// create given directory and all parents
28 /// @return true if the directory was created or already exists
29 bool make_dirs(const std::string &);