49 void decompress(vector<uint8_t>& inContent, vector<uint8_t>& outContent);
77 void getContent(
const string& pathName,
const string&
fileName, vector<uint8_t>& content);
78 void setContent(
const string& pathName,
const string&
fileName,
const vector<uint8_t>& content);
81 void list(
const string& pathName, vector<string>& files,
FileNameFilter* filter =
nullptr,
bool addDrives =
false);
82 bool isPath(
const string& uri);
83 bool isDrive(
const string& uri);
84 bool exists(
const string& uri);
94 void removePath(
const string& pathName,
bool recursive);
96 void rename(
const string& fileNameFrom,
const string& fileNameTo);
Archive 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)
map< string, FileInformation > fileInformations
void setContentFromString(const string &pathName, const string &fileName, const string &content)
Set content from string.
ArchiveFileSystem(const string &fileName="archive.ta")
Public constructor.
virtual ~ArchiveFileSystem()
Public destructor.
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.
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 decompress(vector< uint8_t > &inContent, vector< uint8_t > &outContent)
Decompress from archive.
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.
const string & getArchiveFileName()
void setContentFromStringArray(const string &pathName, const string &fileName, const vector< string > &content)
Set file content as string array.
const string computeSHA256Hash()
Compute SHA256 hash.
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)