Mana
|
These functions wrap PHYSFS functions to provide a more user-friendly interface and to limit the direct use of the PHYSFS API to a single file. More...
Classes | |
class | File |
File wrapper class to provide a more convenient API and automatic closing. More... | |
class | Files |
Helper class to iterate over the files in a directory. More... | |
Functions | |
bool | init (const char *argv0) |
void | deinit () |
const char * | getDirSeparator () |
const char * | getBaseDir () |
const char * | getUserDir () |
const char * | getPrefDir (const char *org, const char *app) |
bool | setWriteDir (const std::string &path) |
Sets the write directory. | |
bool | addToSearchPath (const std::string &path, bool append) |
Adds a directory or archive to the search path. | |
bool | exists (const std::string &path) |
Checks whether the given file or directory exists in the search path. | |
std::optional< const char * > | getRealDir (const std::string &path) |
bool | isDirectory (const std::string &path) |
Checks whether the given path is a directory. | |
bool | mkdir (const std::string &path) |
Creates a directory in the write path. | |
Files | enumerateFiles (const std::string &dir) |
Returns a list of files in the given directory. | |
File | openWrite (const std::string &path) |
File | openAppend (const std::string &path) |
File | openRead (const std::string &path) |
const char * | getLastError () |
SDL_RWops * | openRWops (const std::string &path) |
SDL_RWops * | openBufferedRWops (const std::string &path, PHYSFS_uint64 bufferSize=2048) |
Creates a buffered SDL_RWops. | |
void * | loadFile (const std::string &path, size_t &datasize) |
These functions wrap PHYSFS functions to provide a more user-friendly interface and to limit the direct use of the PHYSFS API to a single file.
|
inline |
Adds a directory or archive to the search path.
If append is true then the directory is added to the end of the search path, otherwise it is added at the front.
true
on success, false
otherwise. Definition at line 85 of file filesystem.h.
|
inline |
Definition at line 42 of file filesystem.h.
|
inline |
Returns a list of files in the given directory.
Definition at line 153 of file filesystem.h.
|
inline |
Checks whether the given file or directory exists in the search path.
Definition at line 93 of file filesystem.h.
|
inline |
Definition at line 52 of file filesystem.h.
|
inline |
Definition at line 47 of file filesystem.h.
|
inline |
Definition at line 252 of file filesystem.h.
|
inline |
Definition at line 62 of file filesystem.h.
|
inline |
Definition at line 98 of file filesystem.h.
|
inline |
Definition at line 57 of file filesystem.h.
|
inline |
Definition at line 37 of file filesystem.h.
|
inline |
Checks whether the given path is a directory.
Definition at line 107 of file filesystem.h.
|
inline |
Definition at line 288 of file filesystem.h.
|
inline |
Creates a directory in the write path.
Definition at line 120 of file filesystem.h.
|
inline |
Definition at line 242 of file filesystem.h.
|
inline |
Creates a buffered SDL_RWops.
Used to workaround a performance issue when SDL_mixer is using stb_vorbis, in which case the file is read one byte at a time.
See https://github.com/libsdl-org/SDL_mixer/issues/670
Definition at line 274 of file filesystem.h.
|
inline |
Definition at line 247 of file filesystem.h.
|
inline |
Definition at line 261 of file filesystem.h.
|
inline |
Definition at line 237 of file filesystem.h.
|
inline |
Sets the write directory.
path | The path of the directory to be added. |
true
on success, false
otherwise. Definition at line 73 of file filesystem.h.