Implements a virtual file system.
More...
#include <Filesystem.h>
List of all members.
Detailed Description
Implements a virtual file system.
Provides cross-platform and transparent archive Filesystem functions.
Constructor & Destructor Documentation
| Filesystem::Filesystem |
( |
const std::string & |
argv_0, |
|
|
const std::string & |
startPath | |
|
) |
| | |
| Filesystem::Filesystem |
( |
|
) |
|
| Filesystem::~Filesystem |
( |
|
) |
|
Shuts down PhysFS and cleans up.
| Filesystem::Filesystem |
( |
const Filesystem & |
|
) |
[private] |
Member Function Documentation
| bool Filesystem::addToSearchPath |
( |
const std::string & |
pathName |
) |
const |
| bool Filesystem::closeFile |
( |
PHYSFS_File * |
file |
) |
const [private] |
Closes a file handle.
- Parameters:
-
| file | A handle to a PHYSFS_file. |
- Returns:
- True on success, false otherwise.
- Note:
- This function sets its paramter to NULL after the file is closed. This effectively invalidates the file handle and so it should not be used again unless properly initialized. This is an intentional design feature to ensure that the use of a file that's been closed cannot be used again.
| void Filesystem::debug |
( |
|
) |
|
| bool Filesystem::deleteFile |
( |
const std::string & |
filename |
) |
const |
| StringList Filesystem::enumerateDir |
( |
const std::string & |
dir, |
|
|
const std::string & |
filter | |
|
) |
| | const |
| StringList Filesystem::enumerateDir |
( |
const std::string & |
dir |
) |
const |
Returns a list of files within a given directory.
- Parameters:
-
| searchDir | Directory to search within the searchpath. |
- Note:
- This function will also return the names of any directories in a specified search path
| bool Filesystem::exists |
( |
const std::string & |
fileName |
) |
const [inline] |
Checks for the existence of a file.
Returns Returns true if the specified file exists. Otherwise, returns false.
| std::string Filesystem::getDataPath |
( |
|
) |
const [inline] |
| File Filesystem::getFile |
( |
const std::string & |
fileName |
) |
const |
| std::string Filesystem::getFileExtension |
( |
const std::string |
path |
) |
|
| std::string Filesystem::getLastError |
( |
|
) |
const [inline] |
Returns the last error that occurred.
Returns a list of directories in the Search Path.
| std::string Filesystem::getUserPath |
( |
|
) |
const [inline] |
Gets the current User path.
| std::string Filesystem::getWorkingDir |
( |
const std::string & |
fileName |
) |
const |
| void Filesystem::init |
( |
const std::string & |
argv_0, |
|
|
const std::string & |
startPath | |
|
) |
| | |
Shuts down PhysFS and cleans up.
| bool Filesystem::isDirectory |
( |
const std::string & |
path |
) |
const [inline] |
Determines if a given path is a directory rather than a file.
| bool Filesystem::makeDirectory |
( |
const std::string & |
dirPath |
) |
const [inline] |
Creates a new directory within the primary search path.
- Returns:
- Returns
true if successful. Otherwise, returns false.
| void Filesystem::toggleVerbose |
( |
|
) |
const [inline] |
| bool Filesystem::writeFile |
( |
const File & |
file, |
|
|
bool |
overwrite = true | |
|
) |
| | const |
Writes a file to disk.
- Parameters:
-
| file | A reference to a const File object. |
- Returns:
- Returns
true if successful. Otherwise, returns false.
Member Data Documentation
Data path string. Specific to each platform.
Platform dependant directory separator.
Path to start in. This will typically be 'data/'.
Displays lots of messages when true. Otherwise only critical messages are displayed.
The documentation for this class was generated from the following files: