mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
+ bool makeDirectory(const string &path);
This commit is contained in:
@ -93,3 +93,8 @@ bool fileExists(const string &path) {
|
||||
fin.close();
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool makeDirectory(const string &path) {
|
||||
int status = mkdir(path.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
return status == 0;
|
||||
}
|
||||
|
@ -38,5 +38,6 @@ string removeLastPathElement(const string path, const bool removePreSeparator =
|
||||
unsigned int getFileSize(const string &path);
|
||||
string getFileSizeAsString(const string &path);
|
||||
bool fileExists(const string &path);
|
||||
bool makeDirectory(const string &path);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user