Class for retrieving file information.
More...
#include <FS_Info.h>
|
static char | getNextSepChar (const char *source) |
|
static char | getPrevSepChar (const char *source) |
|
static bool | customNavigatePath (UT_String &path, const char *file) |
|
static bool | getPathOnDisk (UT_String &path, const char *file) |
|
static bool | isNativePath (const char *path) |
|
static bool | getContentsFromIndexFile (FS_IndexFile &index, UT_StringArray &contents, UT_StringArray *dirs) |
|
static bool | getContentsFromIndexFile (FS_IndexFile &index, UT_StringArray &contents, UT_StringArray *dirs, UT_Array< FS_Stat > *stats, UT_Array< FS_Stat > *dir_stats) |
|
static bool | getContentsFromDiskPath (const char *path, UT_StringArray &contents, UT_StringArray *dirs, UT_Array< FS_Stat > *stats=NULL, UT_Array< FS_Stat > *dir_stats=NULL) |
|
static bool | statFile (const char *source, const char *filename, FS_Stat *fstat) |
|
static void | addInfoHelper (FS_InfoHelper *helper) |
|
static void | removeInfoHelper (FS_InfoHelper *helper) |
|
Class for retrieving file information.
- Examples:
- FS/FS_HomeHelper.C.
Definition at line 99 of file FS_Info.h.
FS_Info::FS_Info |
( |
const char * |
source | ) |
|
Use this constructor to create a new info object. The specified file is not actually opened or accessed until one of the information gathering methods is called.
bool FS_Info::canDeleteFile |
( |
| ) |
const |
bool FS_Info::canReadFile |
( |
| ) |
const |
bool FS_Info::canWriteDirectory |
( |
| ) |
const |
bool FS_Info::canWriteFile |
( |
| ) |
const |
static bool FS_Info::customNavigatePath |
( |
UT_String & |
path, |
|
|
const char * |
file |
|
) |
| |
|
static |
bool FS_Info::exists |
( |
| ) |
const |
bool FS_Info::fileExists |
( |
| ) |
const |
Does bulk load of files and directories from the source. If the source specified in the constructor is a directory rather than an individual file, this method will return a listing of all files and directories contained in that directory.
Returns the file extension.
int64 FS_Info::getFileDataSize |
( |
| ) |
const |
bool FS_Info::getIsDirectory |
( |
| ) |
const |
Returns if the path is a directory.
time_t FS_Info::getModTime |
( |
| ) |
const |
Returns the modification time of the file. The returned value can be cast directly to a time_t value, as defined in the standard C library.
static char FS_Info::getNextSepChar |
( |
const char * |
source | ) |
|
|
static |
static bool FS_Info::getPathOnDisk |
( |
UT_String & |
path, |
|
|
const char * |
file |
|
) |
| |
|
static |
static char FS_Info::getPrevSepChar |
( |
const char * |
source | ) |
|
|
static |
time_t FS_Info::getRecursiveMaxModTime |
( |
| ) |
const |
Returns the latest modification time of the directory and all of its contents recursively. On a file it works like getModTime().
bool FS_Info::glob |
( |
UT_StringArray & |
result, |
|
|
bool |
only_readable = false , |
|
|
bool |
support_special_tokens = false |
|
) |
| |
Treats the source as a path glob pattern and expands it to the available files. Note that backslash escaping with [] is not supported. If support_special_tokens is true, the special token <LASTMATCH> can be used in the pattern. It will be replaced by the last matched path component using a wildcard character.
bool FS_Info::hasAccess |
( |
int |
mode = 0 | ) |
const |
This function returns whether or not the current user has rights to access the file in the given mode. The mode parameter can be any of FS_READ, FS_WRITE, or FS_EXECUTE. You can also or these values together to check multiple access types simultaneously. If the mode value is 0, the function returns true
if the file exists.
static bool FS_Info::isNativePath |
( |
const char * |
path | ) |
|
|
static |
Return the path parsed from the source.
Definition at line 108 of file FS_Info.h.
Return the section parsed from the source.
Definition at line 111 of file FS_Info.h.
static bool FS_Info::statFile |
( |
const char * |
source, |
|
|
const char * |
filename, |
|
|
FS_Stat * |
fstat |
|
) |
| |
|
static |
The documentation for this class was generated from the following file: