All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
File Information

The FS_Info class is used to obtain file information. It takes a file name in its constructor, and lets you gather information about the specified file. The information you can retrieve is not as extensive as using the stat() C library function. The advantage of using this class is that FS_Info supports an extensible architecture for accessing file information from sources other than on disk (see overview).

FS_Info::FS_Info(const char *filename)

-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.

  • 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.

  • Returns if the path is a directory.

  • 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.

  • 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.