Structs§
- Error
- ReadDir
- Iterator over the files in the Teeworlds/DDNet storage. Matching files in the cfg directory overwrite files from the data dir.
Enums§
Functions§
- cached_
config_ directory - cached_
data_ directory - create_
dir_ all - Like std::fs::create_dir_all. Recursively creates the specified directories in the config dir.
- create_
file - Like std::fs::File::create. Creates the specified file in the config dir, potentially overwriting a file.
- exists
- Like std::fs::exists.
Returns
true
, if this file exists in either the data or config dir. - open_
file - Like std::fs::File::open.
Opens a file from the config or data directory in read-only mode.
path
is a relative file path, e.g."mapres/grass_main.png"
. - read_
dir - Like std::fs::read_dir. Returns an iterator over the entries of a directory. The order is unspecified, but config dir entries overwrite data dir entries. So any data dir file will not be yielded if a config dir file has the same name.
- read_
file Deprecated - remove_
dir - Like std::fs::remove_dir. Removes the specified directory in the config dir.
- remove_
file - Like std::fs::remove_file. Remove the specified file in the config dir.
- rename
- Like std::fs::rename. Moves a file within the config dir.