Module ggez::filesystem
[−]
[src]
Provides an interface to the user's filesystem.
This module provides access to files in specific places:
- The
resources/
subdirectory in the same directory as the program executable, - The
resources.zip
file in the same directory as the program executable, - The root folder of the game's "user" directory which is in a
platform-dependent location, such as
~/.local/share/ggez/gameid/
on Linux. Thegameid
part is the ID passed toGame::new()
.
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.
The resources/
subdirectory and resources.zip files are read-only.
Files that are opened for writing using Filesystem::open_options()
will be created in the user
directory.
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. |