X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2Fio.hpp;h=966c4dcc1ec4578ac9fc65066f4083961e2d3215;hb=31a26883ebb253e9a73686b1cb0699b53884885e;hp=4869238352ff3a0bbba536637b95871140adaed0;hpb=e24b4ec1a0fb3ba58a8ea67cd8d8affe3c5a0a71;p=blank.git diff --git a/src/app/io.hpp b/src/app/io.hpp index 4869238..966c4dc 100644 --- a/src/app/io.hpp +++ b/src/app/io.hpp @@ -8,11 +8,22 @@ namespace blank { /// check if give path points to an existing directory bool is_dir(const char *); +inline bool is_dir(const std::string &s) { + return is_dir(s.c_str()); +} +/// check if give path points to an existing file +bool is_file(const char *); +inline bool is_file(const std::string &s) { + return is_file(s.c_str()); +} /// create given directory /// @return true if the directory was created /// the directory might already exist, see errno bool make_dir(const char *); +inline bool make_dir(const std::string &s) { + return make_dir(s.c_str()); +} /// create given directory and all parents /// @return true if the directory was created or already exists bool make_dirs(const std::string &);