1234567891011121314151617181920212223242526272829 |
- #ifndef PATHCREATOR_H
- #define PATHCREATOR_H
- #include <string>
- #include <sys/stat.h>
- #include <unistd.h>
- #include <fstream>
- class PathCreator
- {
- public:
- PathCreator();
- ~PathCreator();
- std::string GetCurPath();
- bool Mkdir(std::string dir);
- bool CreateDatePath(std::string root, bool add_time = true);
- static bool IsPathExist(const std::string& path);
- static bool IsFile(const std::string& path);
- static bool IsFolder(const std::string& path);
- protected:
- std::string m_current_path;
- };
- #endif // PATHCREATOR_H
|