39 const string composeURI(
const string& pathName,
const string& fileName);
40 uint64_t
getFileSize(
const string& pathName,
const string& fileName);
42 void setContentFromString(
const string& pathName,
const string& fileName,
const string& content);
43 void getContent(
const string& pathName,
const string& fileName, vector<uint8_t>& content);
44 void setContent(
const string& pathName,
const string& fileName,
const vector<uint8_t>& content);
47 void list(
const string& pathName, vector<string>& files,
FileNameFilter* filter =
nullptr,
bool addDrives =
false);
48 bool isPath(
const string& uri);
49 bool isDrive(
const string& uri);
50 bool exists(
const string& uri);
51 bool isExecutable(
const string& pathName,
const string& fileName)
override;
52 void setExecutable(
const string& pathName,
const string& fileName)
override;
53 const string getCanonicalURI(
const string& pathName,
const string& fileName);
60 void removePath(
const string& pathName,
bool recursive);
61 void removeFile(
const string& pathName,
const string& fileName);
62 void rename(
const string& fileNameFrom,
const string& fileNameTo);
63 bool getThumbnailAttachment(
const string& pathName,
const string& fileName, vector<uint8_t>& thumbnailAttachmentContent);
Standard file system implementation.
const string removeFileExtension(const string &fileName)
Remove file extension, e.g.
bool isDrive(const string &uri)
Check if file is a drive (applies to Microsoft Windows only)
void setContentFromString(const string &pathName, const string &fileName, const string &content)
Set content from string.
const string composeURI(const string &pathName, const string &fileName)
Compose URI from path name and file name.
const string getPathName(const string &uri)
Get path name.
const string getCanonicalURI(const string &pathName, const string &fileName)
Get canonical URI from given path name and file name.
~StandardFileSystem()
Public destructor.
void createPath(const string &pathName)
Create path.
bool getThumbnailAttachment(const string &pathName, const string &fileName, vector< uint8_t > &thumbnailAttachmentContent)
Reads a thumbnail attachment from binary file.
void list(const string &pathName, vector< string > &files, FileNameFilter *filter=nullptr, bool addDrives=false)
List files for given path and filter by a file name filter if not null.
void changePath(const string &pathName)
Change path.
void removePath(const string &pathName, bool recursive)
Remove path.
void setExecutable(const string &pathName, const string &fileName) override
Set up file to be an executable file.
void setContent(const string &pathName, const string &fileName, const vector< uint8_t > &content)
Set file content.
void getContent(const string &pathName, const string &fileName, vector< uint8_t > &content)
Get file content.
void setContentFromStringArray(const string &pathName, const string &fileName, const vector< string > &content)
Set file content as string array.
StandardFileSystem()
Public constructor.
void removeFile(const string &pathName, const string &fileName)
Remove file.
uint64_t getFileSize(const string &pathName, const string &fileName)
Return file size of given file.
void getContentAsStringArray(const string &pathName, const string &fileName, vector< string > &content)
Get file content as string array.
const string getFileName(const string &uri)
Get file name.
bool isPath(const string &uri)
Check if file is a path.
bool exists(const string &uri)
Check if file exists.
const string getCurrentWorkingPathName()
Get current working path name.
bool isExecutable(const string &pathName, const string &fileName) override
Returns if file is a executable file.
const string getContentAsString(const string &pathName, const string &fileName)
Get content as string.
void rename(const string &fileNameFrom, const string &fileNameTo)
Rename file.
File system file name filter interface.
#define FORBID_CLASS_COPY(CLASS)