|
FEDEM Model Database
R8.0
Source code of the FEDEM model database
|
File system utilities. More...
Functions | |
| unsigned int | getFileSize (const std::string &filename) |
| Returns the number of bytes in the file filename. More... | |
| std::string | fileLastModified (const std::string &filename) |
| Returns the date and time of last change of the file filename. More... | |
| std::string | getHomeDir () |
| Returns the home directory of the running process. More... | |
| bool | isFile (const std::string &path) |
| Returns true if path is an existing file. More... | |
| bool | isDirectory (const std::string &path) |
| Returns true if path is an existing directory. More... | |
| bool | isReadable (const std::string &filename) |
| Returns true if filename can be opened for reading. More... | |
| bool | isWritable (const std::string &filename) |
| Returns true if filename can be opened for writing. More... | |
| bool | deleteFile (const std::string &filename) |
| Deletes the file filename from disk. More... | |
| bool | renameFile (const std::string &from, const std::string &to) |
| Rename the file named from to to. More... | |
| bool | copyFile (const std::string &from, const std::string &to) |
| Copies the file named from to to. More... | |
| bool | copyFile (const std::string &filename, const std::string &from, const std::string &to) |
| Copies the file filename in directory from to to. More... | |
| bool | verifyDirectory (const std::string &dirName, bool create=true) |
| Check that the directory dirName exists - if not create it. More... | |
| int | removeDir (const std::string &dirName, bool removeFiles=true) |
| Recursively remove the directory dirName. More... | |
| int | getNextDirIncrement (const std::string &dirName, const std::string &baseDirName) |
| File name checks - get unique number on a directory. More... | |
| 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. More... | |
| int | getNextIncrement (const std::vector< std::string > &dirNames, const char *extension) |
| File name checks - get unique number on files. More... | |
| 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. More... | |
| 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. More... | |
File system utilities.
| bool FmFileSys::copyFile | ( | const std::string & | filename, |
| const std::string & | from, | ||
| const std::string & | to | ||
| ) |
Copies the file filename in directory from to to.
| bool FmFileSys::copyFile | ( | const std::string & | from, |
| const std::string & | to | ||
| ) |
Copies the file named from to to.
| bool FmFileSys::deleteFile | ( | const std::string & | filename | ) |
Deletes the file filename from disk.
| std::string FmFileSys::fileLastModified | ( | const std::string & | filename | ) |
Returns the date and time of last change of the file filename.
| bool FmFileSys::getDirs | ( | std::vector< std::string > & | foundDirs, |
| const std::string & | searchPath, | ||
| const char * | filter = NULL, |
||
| bool | fullPath = false |
||
| ) |
Find all subdirectories in a named directory.
| bool FmFileSys::getFiles | ( | std::vector< std::string > & | foundFiles, |
| const std::string & | searchPath, | ||
| const char * | filter = NULL, |
||
| bool | fullPath = false |
||
| ) |
Find all files in a named directory.
| unsigned int FmFileSys::getFileSize | ( | const std::string & | filename | ) |
Returns the number of bytes in the file filename.
| std::string FmFileSys::getHomeDir | ( | ) |
Returns the home directory of the running process.
| int FmFileSys::getNextDirIncrement | ( | const std::string & | dirName, |
| const std::string & | baseDirName | ||
| ) |
File name checks - get unique number on a directory.
| int FmFileSys::getNextIncrement | ( | const std::string & | dirName, |
| const char * | extension, | ||
| int | startInc = 1, |
||
| const char * | filter = NULL |
||
| ) |
File name checks - get unique number on a file.
| int FmFileSys::getNextIncrement | ( | const std::vector< std::string > & | dirNames, |
| const char * | extension | ||
| ) |
File name checks - get unique number on files.
| bool FmFileSys::isDirectory | ( | const std::string & | path | ) |
Returns true if path is an existing directory.
| bool FmFileSys::isFile | ( | const std::string & | path | ) |
Returns true if path is an existing file.
| bool FmFileSys::isReadable | ( | const std::string & | filename | ) |
Returns true if filename can be opened for reading.
| bool FmFileSys::isWritable | ( | const std::string & | filename | ) |
Returns true if filename can be opened for writing.
| int FmFileSys::removeDir | ( | const std::string & | dirName, |
| bool | removeFiles = true |
||
| ) |
Recursively remove the directory dirName.
| bool FmFileSys::renameFile | ( | const std::string & | from, |
| const std::string & | to | ||
| ) |
Rename the file named from to to.
| bool FmFileSys::verifyDirectory | ( | const std::string & | dirName, |
| bool | create = true |
||
| ) |
Check that the directory dirName exists - if not create it.