23 unsigned int getFileSize(
const std::string& filename);
32 bool isFile(
const std::string& path);
44 bool renameFile(
const std::string& from,
const std::string& to);
46 bool copyFile(
const std::string& from,
const std::string& to);
48 bool copyFile(
const std::string& filename,
49 const std::string& from,
const std::string& to);
55 int removeDir(
const std::string& dirName,
bool removeFiles =
true);
59 const std::string& baseDirName);
62 int startInc = 1,
const char* filter = NULL);
65 const char* extension);
68 bool getDirs(std::vector<std::string>& foundDirs,
69 const std::string& searchPath,
70 const char* filter = NULL,
bool fullPath =
false);
73 bool getFiles(std::vector<std::string>& foundFiles,
74 const std::string& searchPath,
75 const char* filter = NULL,
bool fullPath =
false);
File system utilities.
Definition: FmFileSys.H:21
bool isWritable(const std::string &filename)
Returns true if filename can be opened for writing.
Definition: FmFileSys.C:127
bool isDirectory(const std::string &path)
Returns true if path is an existing directory.
Definition: FmFileSys.C:95
std::string fileLastModified(const std::string &filename)
Returns the date and time of last change of the file filename.
Definition: FmFileSys.C:62
bool getDirs(std::vector< std::string > &foundDirs, const std::string &searchPath, const char *filter=NULL, bool fullPath=false)
Find all subdirectories in a named directory.
Definition: FmFileSys.C:304
bool isReadable(const std::string &filename)
Returns true if filename can be opened for reading.
Definition: FmFileSys.C:113
int getNextIncrement(const std::string &dirName, const char *extension, int startInc=1, const char *filter=NULL)
File name checks - get unique number on a file.
Definition: FmFileSys.C:358
bool getFiles(std::vector< std::string > &foundFiles, const std::string &searchPath, const char *filter=NULL, bool fullPath=false)
Find all files in a named directory.
Definition: FmFileSys.C:313
bool renameFile(const std::string &from, const std::string &to)
Rename the file named from to to.
Definition: FmFileSys.C:151
int getNextDirIncrement(const std::string &dirName, const std::string &baseDirName)
File name checks - get unique number on a directory.
Definition: FmFileSys.C:334
bool deleteFile(const std::string &filename)
Deletes the file filename from disk.
Definition: FmFileSys.C:141
std::string getHomeDir()
Returns the home directory of the running process.
Definition: FmFileSys.C:34
bool isFile(const std::string &path)
Returns true if path is an existing file.
Definition: FmFileSys.C:77
unsigned int getFileSize(const std::string &filename)
Returns the number of bytes in the file filename.
Definition: FmFileSys.C:47
bool verifyDirectory(const std::string &dirName, bool create=true)
Check that the directory dirName exists - if not create it.
Definition: FmFileSys.C:192
int removeDir(const std::string &dirName, bool removeFiles=true)
Recursively remove the directory dirName.
Definition: FmFileSys.C:392
bool copyFile(const std::string &from, const std::string &to)
Copies the file named from to to.
Definition: FmFileSys.C:160