|
wavelength 1.0.0
|
#include <stdbool.h>
Go to the source code of this file.
Functions | |
| const char * | FileRoot () |
| Report the directory the game's files are read from, .
| |
| const char * | FileNormalizePath (const char *pszPath) |
| Normalise a path. | |
| const char * | FileRelativePath (const char *pszPath, const char *pszBase) |
| Express a path relative to a base directory. | |
| bool | FileIsAbsolute (const char *pszPath) |
| Report whether a path is absolute. | |
| const char * | FileGetPath (const char *pszPath) |
| Report the directory part of a path. | |
| const char * | FileGetExt (const char *pszPath) |
| Report the extension of a path. | |
| const char * | FileGetBaseName (const char *pszPath) |
| Report the file name of a path without its directory and its extension. | |
| int | FileTableRead (int nDescriptor, void *pBuffer, int nBytes) |
| Read bytes from a file of gFileTable. | |
| const char * FileRoot | ( | ) |
Report the directory the game's files are read from, .
.
The name is inferred.
| const char * FileNormalizePath | ( | const char * | pszPath | ) |
Normalise a path.
The path is lower-cased, its backslashes become slashes, and its . components and every .. component with a preceding component to cancel are removed. A path whose last such component cancels a preceding one normalises to the empty string. A leading slash is preserved.
| pszPath | The path. |
| const char * FileRelativePath | ( | const char * | pszPath, |
| const char * | pszBase ) |
Express a path relative to a base directory.
Both paths are split at their slashes. The components they share at the start are dropped, a .. replaces each remaining component of the base, and the remaining components of the path follow.
| pszPath | The path. |
| pszBase | The base directory. |
| bool FileIsAbsolute | ( | const char * | pszPath | ) |
Report whether a path is absolute.
A path is absolute when it starts with a slash or a backslash or has a colon as its second character. A null or empty path is treated as absolute.
| pszPath | The path, or null. |
| const char * FileGetPath | ( | const char * | pszPath | ) |
Report the directory part of a path.
The result is the path up to its last forward or backward slash, or . when the path has no slash or is null.
| pszPath | The path, or null. |
| const char * FileGetExt | ( | const char * | pszPath | ) |
Report the extension of a path.
The result is the text after the last full stop, or the empty text at the end of a path without a full stop.
| pszPath | The path. |
| const char * FileGetBaseName | ( | const char * | pszPath | ) |
Report the file name of a path without its directory and its extension.
| pszPath | The path. |
| int FileTableRead | ( | int | nDescriptor, |
| void * | pBuffer, | ||
| int | nBytes ) |
Read bytes from a file of gFileTable.
| nDescriptor | The index of the file. |
| pBuffer | Receives the bytes. |
| nBytes | The number of bytes. |