Public Types |
| enum | Type { TGeneral = 0,
TDso = 1,
TExecutable = 2
} |
Public Member Functions |
| | Filename (Filename const copy) |
| | Filename (Filename const dirname, Filename const basename) |
| | Filename () |
| | Filename (string filename) |
| | Filename (string filename) |
| | Filename (string filename) |
| bool | chdir () |
| int | compareTimestamps (Filename const other, bool this_missing_is_old, bool other_missing_is_old) |
| int | compareTimestamps (Filename const other, bool this_missing_is_old) |
| int | compareTimestamps (Filename const other) |
| int | compareTo (Filename const other) |
| bool | copyTo (Filename const other) |
| string | cStr () |
| bool | empty () |
| bool | exists () |
| | extractComponents (vectorbasic_stringchar components) |
| int | findOnSearchpath (DSearchPath const searchpath) |
| unsigned int | getAccessTimestamp () |
| string | getBasename () |
| | Returns the basename part of the filename.
|
| string | getBasenameWoExtension () |
| | Returns the basename part of the filename, without the file extension.
|
| string | getDirname () |
| | Returns the directory part of the filename.
|
| string | getExtension () |
| | Returns the file extension.
|
| Filename | getFilenameIndex (int index) |
| int | getFileSize () |
| string | getFullpath () |
| | Returns the entire filename: directory, basename, extension.
|
| string | getFullpathW () |
| | Returns the entire filename as a wide-character string.
|
| string | getFullpathWoExtension () |
| | Returns the full filename--directory and basename parts--except for the extension.
|
| int | getHash () |
| string | getHashToEnd () |
| | Returns the part of the filename beginning at the hash sequence (if any), and continuing to the end of the filename.
|
| bool | getPattern () |
| | Returns the flag indicating whether this is a filename pattern.
|
| unsigned int | getTimestamp () |
| Type | getType () |
| | Returns the type of the file represented by the filename, as previously set by set_type().
|
| bool | hasHash () |
| | Returns true if the filename is indicated to be a filename pattern (that is, set_pattern(true) was called), and the filename pattern did include a sequence of hash marks, or false if it was not a filename pattern or did not include hash marks.
|
| bool | isBinary () |
| | Returns true if the Filename has been indicated to represent a binary file via a previous call to set_binary().
|
| bool | isBinaryOrText () |
| | Returns true either is_binary() or is_text() is true; that is, that the filename has been specified as either binary or text.
|
| bool | isDirectory () |
| bool | isExecutable () |
| bool | isFullyQualified () |
| | Returns true if the filename is fully qualified, e.g.
|
| bool | isLocal () |
| | Returns true if the filename is local, e.g.
|
| bool | isRegularFile () |
| bool | isText () |
| | Returns true if the Filename has been indicated to represent a text file via a previous call to set_text().
|
| bool | isWritable () |
| unsigned int | length () |
| | makeAbsolute () |
| | makeAbsolute (Filename const start_directory) |
| bool | makeCanonical () |
| bool | makeDir () |
| bool | makeRelativeTo (Filename directory, bool allow_backups) |
| bool | makeRelativeTo (Filename directory) |
| bool | makeTrueCase () |
| bool | mkdir () |
| bool | nonzero () |
| | Returns true if the Filename is valid (not empty), or false if it is an empty string.
|
| bool | openAppend (OFileStream stream) |
| bool | openAppend (ofstream stream) |
| bool | openRead (IFileStream stream) |
| bool | openRead (ifstream stream) |
| bool | openReadAppend (fstream stream) |
| bool | openReadAppend (FileStream stream) |
| bool | openReadWrite (FileStream stream) |
| bool | openReadWrite (fstream stream) |
| bool | openReadWrite (fstream stream, bool truncate) |
| bool | openReadWrite (FileStream stream, bool truncate) |
| bool | openWrite (OFileStream stream) |
| bool | openWrite (ofstream stream) |
| bool | openWrite (ofstream stream, bool truncate) |
| bool | openWrite (OFileStream stream, bool truncate) |
| bool | operator!= (string other) |
| Filename | operator+ (string other) |
| | Returns a new Filename representing the concatenation of the two filenames.
|
| Filename | operator+= (string other) |
| | Appends the other filename onto the end of this one.
|
| bool | operator< (string other) |
| Filename | operator= (string filename) |
| Filename | operator= (Filename const copy) |
| Filename | operator= (string filename) |
| Filename | operator= (string filename) |
| bool | operator== (string other) |
| char | operator[] (int n) |
| | output (ostream out) |
| PyObject | reduce (PyObject self) |
| bool | renameTo (Filename const other) |
| bool | resolveFilename (DSearchPath const searchpath, string default_extension) |
| bool | resolveFilename (DSearchPath const searchpath) |
| bool | rmdir () |
| bool | scanDirectory (vectorbasic_stringchar contents) |
| PyObject | scanDirectory () |
| | setBasename (string s) |
| | setBasenameWoExtension (string s) |
| | setBinary () |
| | Indicates that the filename represents a binary file.
|
| | setDirname (string s) |
| | setExtension (string s) |
| | setFullpath (string s) |
| | setFullpathWoExtension (string s) |
| | setHashToEnd (string s) |
| | setPattern (bool pattern) |
| | Sets the flag indicating whether this is a filename pattern.
|
| | setText () |
| | Indicates that the filename represents a text file.
|
| | setType (Type type) |
| | Sets the type of the file represented by the filename.
|
| | standardize () |
| string | substr (unsigned int begin, unsigned int end) |
| string | substr (unsigned int begin) |
| string | toOsGeneric () |
| string | toOsLongName () |
| string | toOsShortName () |
| string | toOsSpecific () |
| string | toOsSpecificW () |
| bool | touch () |
| bool | unlink () |
Static Public Member Functions |
| static Filename | binaryFilename (Filename const filename) |
| static Filename | binaryFilename (string filename) |
| static Filename | dsoFilename (string filename) |
| static Filename | executableFilename (string filename) |
| static Filename | expandFrom (string user_string, Type type) |
| static Filename | expandFrom (string user_string) |
| static Filename | fromOsSpecific (string os_specific, Type type) |
| static Filename | fromOsSpecific (string os_specific) |
| static Filename | fromOsSpecificW (string os_specific, Type type) |
| static Filename | fromOsSpecificW (string os_specific) |
| static TypeHandle | getClassType () |
| static Filename const | getCommonAppdataDirectory () |
| static Encoding | getFilesystemEncoding () |
| | Specifies the default encoding to be used for all subsequent Filenames objects.
|
| static Filename const | getHomeDirectory () |
| static Filename const | getTempDirectory () |
| static Filename const | getUserAppdataDirectory () |
| static Filename | patternFilename (string filename) |
| | Constructs a filename that represents a sequence of numbered files.
|
| static | setFilesystemEncoding (Encoding encoding) |
| | Specifies the default encoding to be used for all subsequent Filenames.
|
| static Filename | temporary (string dirname, string prefix) |
| static Filename | temporary (string dirname, string prefix, string suffix) |
| static Filename | temporary (string dirname, string prefix, string suffix, Type type) |
| static Filename | textFilename (Filename const filename) |
| static Filename | textFilename (string filename) |
The name of a file, such as a texture file or an Egg file.
Stores the full pathname, and includes functions for extracting out the directory prefix part and the file extension and stuff.
A Filename is also aware of the mapping between the Unix-like filename convention we use internally, and the local OS's specific filename convention, and it knows how to perform basic OS-specific I/O, like testing for file existence and searching a searchpath, as well as the best way to open an fstream for reading or writing.