#include <FS_Info.h>
Public Member Functions | |
| FS_Info (const char *source) | |
| virtual | ~FS_Info () |
| bool | hasAccess (int mode=0) const |
| bool | getIsDirectory () const |
| Returns if the path is a directory. | |
| int | getModTime () const |
| int64 | getFileDataSize () const |
| Returns the file size. | |
| bool | getContents (UT_StringArray &contents, UT_StringArray *dirs=0, UT_RefArray< FS_Stat > *stats=0, UT_RefArray< FS_Stat > *dir_stats=0) |
| bool | fileExists () const |
| bool | canReadFile () const |
| bool | canWriteFile () const |
| bool | canWriteDirectory () const |
| bool | canDeleteFile () const |
Static Public Member Functions | |
| static char | getNextSepChar (const char *source) |
| static char | getPrevSepChar (const char *source) |
| static bool | getContentsFromIndexFile (FS_IndexFile &index, UT_StringArray &contents, UT_StringArray *dirs) |
| static bool | statFile (const char *source, const char *filename, FS_Stat *fstat) |
| static void | addInfoHelper (FS_InfoHelper *helper) |
| static void | removeInfoHelper (FS_InfoHelper *helper) |
Definition at line 78 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.
| virtual FS_Info::~FS_Info | ( | ) | [virtual] |
| static void FS_Info::addInfoHelper | ( | FS_InfoHelper * | helper | ) | [static] |
| bool FS_Info::canDeleteFile | ( | ) | const |
| bool FS_Info::canReadFile | ( | ) | const |
| bool FS_Info::canWriteDirectory | ( | ) | const |
| bool FS_Info::canWriteFile | ( | ) | const |
| bool FS_Info::fileExists | ( | ) | const |
| bool FS_Info::getContents | ( | UT_StringArray & | contents, | |
| UT_StringArray * | dirs = 0, |
|||
| UT_RefArray< FS_Stat > * | stats = 0, |
|||
| UT_RefArray< FS_Stat > * | dir_stats = 0 | |||
| ) |
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.
| static bool FS_Info::getContentsFromIndexFile | ( | FS_IndexFile & | index, | |
| UT_StringArray & | contents, | |||
| UT_StringArray * | dirs | |||
| ) | [static] |
| int64 FS_Info::getFileDataSize | ( | ) | const |
Returns the file size.
| bool FS_Info::getIsDirectory | ( | ) | const |
Returns if the path is a directory.
| int 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 char FS_Info::getPrevSepChar | ( | const char * | source | ) | [static] |
| 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 void FS_Info::removeInfoHelper | ( | FS_InfoHelper * | helper | ) | [static] |
| static bool FS_Info::statFile | ( | const char * | source, | |
| const char * | filename, | |||
| FS_Stat * | fstat | |||
| ) | [static] |
1.5.9