47 #ifndef support_FileUtil_hpp 48 #define support_FileUtil_hpp 103 fnmatch(
const std::string pattern,
const char*
string,
int flags = 0)
105 int fnd =
::fnmatch(pattern.c_str(), string, flags);
111 else if (fnd != FNM_NOMATCH) {
119 fnmatch(
const std::vector<std::string>& patternVec,
139 isDir(
const char* path);
144 return isDir(path.c_str());
161 copy(
const char* destFile, ...);
164 copy(
const std::string& dst,
const std::string& src)
166 copy(dst.c_str(), src.c_str(),
NULL);
171 move(
const char* dst,
const char* src);
174 move(
const std::string& dst,
const std::string& src)
176 move(dst.c_str(), src.c_str());
183 remove(
const char* fname);
188 mkdir(
const char* dir);
198 std::pair<std::string, bool>
201 inline std::pair<std::string, bool>
218 #endif // support_FileUtil_hpp
void copy(const char *dst,...)
string dirname(const char *fName)
bool isReadable(const char *path)
bool fnmatch(const std::vector< std::string > &patternVec, const char *string, int flags)
void move(const char *dst, const char *src)
bool isDir(const char *path)
std::pair< string, bool > mkdirUnique(const char *dirnm)
int countChar(const char *path, char c)
int mkdir(const char *dir)
string basename(const char *fName)
string rmSuffix(const char *fName)