Struct ggez::filesystem::Filesystem [] [src]

pub struct Filesystem { /* fields omitted */ }

A structure that contains the filesystem state and cache.

Methods

impl Filesystem
[src]

Create a new Filesystem instance, using the given id and (on some platforms) the author as a portion of the user directory path. This function is called automatically by ggez, the end user should never need to call it.

Opens the given path and returns the resulting File in read-only mode.

Opens a file in the user directory with the given std::fs::OpenOptions. Note that even if you open a file read-only, it can only access files in the user directory.

Creates a new file in the user directory and opens it to be written to, truncating it if it already exists.

Create an empty directory in the user dir with the given name. Any parents to that directory that do not exist will be created.

Deletes the specified file in the user dir.

Deletes the specified directory in the user dir, and all its contents!

Check whether a file or directory exists.

Check whether a path points at a file.

Check whether a path points at a directory.

Return the full path to the user data directory

Returns the full path to the resource directory (even if it doesn't exist)

Returns a list of all files and directories in the resource directory, in no particular order.

Lists the base directory if an empty path is given.

Prints the contents of all data directories. Useful for debugging.

Looks for a file named "conf.toml" in the resources directory loads it if it finds it. If it can't read it for some reason, returns an error.

Takes a conf::Conf object and saves it to the user directory, overwriting any file already there.

Trait Implementations

impl Debug for Filesystem
[src]

Formats the value using the given formatter.