iRoCS Toolbox
1.1.0
|
#include <BaseFile.hh>
Static Public Member Functions | |
static std::string | BaseName (const std::string &aPathName) |
BaseName returns the file name component of the path. More... | |
static std::string | BaseNamePath (const std::string &aPathName) |
BaseNamePath returns the fully qualified path to the file. More... | |
static std::string | BeautifyFilePath (const std::string &aPath) |
BeautifyFilePath sanitizes a path to a file or directory. More... | |
static bool | Copy (const std::string &aOldName, const std::string &aNewName) |
Copy copies a file or directory. More... | |
static bool | DirectoryCreate (const std::string &aPathName) |
DirectoryCreate cretaes a directory at the specified path. More... | |
static std::string | DirName (const std::string &aPathName) |
DirName returns the directory name component ofthe path. More... | |
static bool | Exists (const std::string &aPathName) |
Exists tests for existance of a file or directory using the stat() function call (which succeeds even if no read permissions are available. More... | |
static std::string | FindUniqueUnexistingName (std::string const &aBaseName, char aPattern) |
Generates a new unique file name using pattern. More... | |
static bool | IsDirectory (const std::string &aPathName) |
IsDirectory tests whether a file system entry is a directory or not. More... | |
static bool | IsFile (const std::string &aPathName) |
IsFile tests whether a file system entry is a normal file or not. More... | |
static bool | IsLink (const std::string &aPathName) |
IsLink tests whether a file system entry is a symlink or not. More... | |
static bool | ListDir (const std::string &aInputDir, std::vector< std::string > &aFiles, const std::string &aPattern) |
Lists the files in a directory. More... | |
static bool | Move (const std::string &aOldName, const std::string &aNewName) |
Move renames a file or directory. More... | |
static bool | Remove (const std::string &aPathName) |
Remove deletes a file or directory. More... | |
Definition at line 48 of file BaseFile.hh.
|
static |
BaseName returns the file name component of the path.
Note that it will return the original name, if no '/' character is found in the path name.
|
static |
DirName returns the directory name component ofthe path.
Note that it will return an empty string if no '/' character is found in the path name.
|
static |
BaseNamePath returns the fully qualified path to the file.
It expands all symbolic links and resolves references to /./, /../ and extra '/' characters, to produce a canonicalized absolute pathname.
|
static |
Exists tests for existance of a file or directory using the stat() function call (which succeeds even if no read permissions are available.
aPathName | the path to the file/directory to check |
|
static |
IsFile tests whether a file system entry is a normal file or not.
aPathName | the path to the file/directory to check |
|
static |
IsLink tests whether a file system entry is a symlink or not.
aPathName | the path to the file/directory to check |
|
static |
IsDirectory tests whether a file system entry is a directory or not.
aPathName | the path to the file/directory to check |
|
static |
DirectoryCreate cretaes a directory at the specified path.
If the directory already exists, nothing is done.
aPathName | the path to the directory to create. |
|
static |
Lists the files in a directory.
aInputDir | the path to the directory |
aFiles | a vector of fully qualified entries |
aPattern |
|
static |
Remove deletes a file or directory.
aPathName | the path to the file/directory to remove |
|
static |
Move renames a file or directory.
aOldName | the path to the file/directory to rename |
aNewName | the path to the new file/directory name |
|
static |
Copy copies a file or directory.
aOldName | the path to the file/directory to rename |
aNewName | the path to the new file/directory name |
|
static |
Generates a new unique file name using pattern.
aBaseName | Prefix |
aPattern | Pattern |
|
static |
BeautifyFilePath sanitizes a path to a file or directory.
It replaces duplicate slashes with signle slashes, uses forward slashes where possible, and other neat things.
aPath | the path to the file/directory to beautify |