STIRA
0.1
|
class to facilitate file access in directories. More...
#include <FileAccess.h>
Public Member Functions | |
FileAccess () | |
~FileAccess () | |
Static Public Member Functions | |
static std::vector< std::string > | ListFilesInSubFoldersInFolder (std::string pathToAccess, std::string prefix, std::string extension, bool separatorIsUnderscore=false) |
Gets a list of subdirectories with given prefix in a directory References: http://www.linuxquestions.org/questions/programming-9/c-list-files-in-directory-379323/ http://www.gnu.org/software/libc/manual/html_node/File-System-Interface.html#File-System-Interface http://en.wikipedia.org/wiki/Dirent.h http://www.gnu.org/software/libc/manual/html_node/Simple-Directory-Lister.html#Simple-Directory-Lister. More... | |
static std::vector< std::string > | ListFilesOfType (std::string pathToAccess, std::string prefix, std::string extension, bool usePrefix, bool separatorIsUnderscore=false, int startNrImage=-1, int maxNrFiles=-1) |
Gets a list of files in a directory with given extension References: http://www.linuxquestions.org/questions/programming-9/c-list-files-in-directory-379323/ http://www.gnu.org/software/libc/manual/html_node/File-System-Interface.html#File-System-Interface http://en.wikipedia.org/wiki/Dirent.h http://www.gnu.org/software/libc/manual/html_node/Simple-Directory-Lister.html#Simple-Directory-Lister. More... | |
static std::string | FindFileName (std::vector< std::string > fileList, int frameNr) |
finds file name from that contains a given index number in a list of file names More... | |
static bool | CheckIfDirectoryExists (const std::string dirName) |
checks if a given directory name exists More... | |
static bool | CheckIfFileExists (const std::string &name) |
static bool | CreateNewDirectory (std::string dirName) |
creates a directory with given name Reference: http://www.go4expert.com/forums/showthread.php?t=9031 (create a directory) More... | |
static bool | CreateSymbolicLink2File (std::string sourcePathAndFileName, std::string linkPathAndFileName) |
creates a directory with given name Reference: http://www.dreamincode.net/forums/topic/200281-creating-a-symbolic-link-from-c-program/ More... | |
class to facilitate file access in directories.
stira::common::FileAccess::FileAccess | ( | ) |
constructor
stira::common::FileAccess::~FileAccess | ( | ) |
destructor
|
static |
checks if a given directory name exists
dirName | the directory name to check if it exists |
|
static |
creates a directory with given name Reference: http://www.go4expert.com/forums/showthread.php?t=9031 (create a directory)
dirName | the directory name to create |
|
static |
creates a directory with given name Reference: http://www.dreamincode.net/forums/topic/200281-creating-a-symbolic-link-from-c-program/
sourcePathAndFileName | the source file and its path |
linkPathAndFileName | the path and name for the symbolic link |
|
static |
finds file name from that contains a given index number in a list of file names
fileList | the list of files in which to search; |
frameNr | the frame number for which to find the full file name |
|
static |
Gets a list of subdirectories with given prefix in a directory References: http://www.linuxquestions.org/questions/programming-9/c-list-files-in-directory-379323/ http://www.gnu.org/software/libc/manual/html_node/File-System-Interface.html#File-System-Interface http://en.wikipedia.org/wiki/Dirent.h http://www.gnu.org/software/libc/manual/html_node/Simple-Directory-Lister.html#Simple-Directory-Lister.
pathToAccess | the path to the directory containing the subdirectories |
prefix | the wanted subdirectory prefix |
extension | the wanted file extension |
|
static |
Gets a list of files in a directory with given extension References: http://www.linuxquestions.org/questions/programming-9/c-list-files-in-directory-379323/ http://www.gnu.org/software/libc/manual/html_node/File-System-Interface.html#File-System-Interface http://en.wikipedia.org/wiki/Dirent.h http://www.gnu.org/software/libc/manual/html_node/Simple-Directory-Lister.html#Simple-Directory-Lister.
pathToAccess | the path to the directory containing the files |
extension | the wanted file extension |
startNrImage | to restrict which files are taken, we can set a certain start number; if set to -1, the smallest possible file index will be taken |
maxNrFiles | to restrict which files are taken, we can set a certain maximum number of files; if set to -1, all available files will be taken |