110 std::string
ValidFileName(std::string _sFileName,
const std::string sExtension =
".dat",
bool checkExtension =
true,
bool doCleanPath =
true)
const;
111 std::string
ValidFolderName(std::string _sFileName,
bool doCleanPath =
true,
bool appendTrailingSeparator =
true)
const;
112 std::string
ValidizeAndPrepareName(
const std::string& _sFileName,
const std::string& sExtension =
".dat")
const;
113 int setPath(std::string _sPath,
bool bMkDir, std::string _sExePath);
116 std::vector<std::string>
getFileParts(
const std::string& sFilePath)
const;
119 bool isFile(
const std::string& _sPath)
const;
136 if (sFileType[0] ==
'.')
This class implements the basic input/ output file system and provides functionalities to work with f...
void setProgramPath(std::string _sExePath)
std::string getProgramPath() const
std::string ValidFolderName(std::string _sFileName, bool doCleanPath=true, bool appendTrailingSeparator=true) const
This member function evaluates, whether the passed foldername is a valid foldername.
std::string ValidizeAndPrepareName(const std::string &_sFileName, const std::string &sExtension=".dat") const
This member function validizes the passed file name and creates the needed folders on-the-fly.
std::string cleanPath(std::string sFilePath, bool checkInvalidChars) const
This function cleans the passed file path, i.e. replaces the character encoding of umlauts,...
std::string sExecutablePath
FileSystem & assign(const FileSystem &_fSys)
Assignment member function to copy the settings from another FileSystem instance.
std::vector< std::string > getFileParts(const std::string &sFilePath) const
This member function separates all path parts into single strings: the drive letter,...
void initializeFromKernel()
Member function to remote-initialize the class from the kernel. Cannot be used during kernel start-up...
FileInfo getFileInfo(const std::string &sFilePath) const
Return the file information about the passed file path.
std::string getPath() const
Returns the default path of this FileSystem instance.
void resolveWildCards(std::string &_sFileName, bool isFile, bool checkExtension=true) const
This member function resolves all wildcards, which may be found in the passed filename.
std::string ValidFileName(std::string _sFileName, const std::string sExtension=".dat", bool checkExtension=true, bool doCleanPath=true) const
This member function evaluates, whether the passed filename is a valid filename. One may supply a pre...
FileSystem()
Default constructor.
void setTokens(std::string _sTokens)
This member function may be used to update the path placeholders of the current FileSystem instance.
void createRevisionsFolder()
This member function creates the hidden revisions folders for the version control system.
void declareFileType(const std::string &sFileType)
std::string sTokens[7][2]
std::string sValidExtensions
bool isFile(const std::string &_sPath) const
This function determines, whether a path name indicates a file or a folder.
int createFolders(const std::string &_sPath) const
This member function creates all missing directories in the passed path.
int setPath(std::string _sPath, bool bMkDir, std::string _sExePath)
This member function may be used to set the preferred file path of the current FileSystem instance.
static bool checkInvalidChars(std::string sPathname)
This function checks for the invalid chars that can not appear in a valid directory name.
std::string fromSystemCodePage(std::string)
Transforms the system code page to the internal one.
std::string toSystemCodePage(std::string)
Converts an internal to an external string. Does nothing currently.
This structure contains all relevant information about a file path.
@ ATTR_RECALL_ON_DATA_ACCESS
@ ATTR_NOT_CONTENT_INDEXED