Module ggez::filesystem
[−]
[src]
Provides a portable interface to the filesystem.
This module provides access to files in specific places:
- The
resources/subdirectory in the same directory as the program executable, - The
resources.zipfile in the same directory as the program executable, - The root folder of the game's "save" directory which is in a
platform-dependent location,
such as
~/.local/share/<gameid>/on Linux. Thegameidis the the string passed toContext::load_from_conf(); some platforms such as Windows also incorporate theauthorstring into the path.
Files will be looked for in these locations in order, and the first one
found used. That allows game assets to be easily distributed as an archive
file, but locally overridden for testing or modding simply by putting
altered copies of them in the game's resources/ directory.
Note that the file lookups WILL follow symlinks! It is more for convenience than absolute security, so don't treat it as being secure.
If you build ggez with the cargo-resource-root feature flag, it will
also look for a resources/ subdirectory in the same directory as your
Cargo.toml, which can be very convenient for development.
Structs
| Filesystem |
A structure that contains the filesystem state and cache. |
Enums
| File |
Represents a file, either in the filesystem, or in the resources zip file, or whatever. |