Expand description
Filesystem operations with feature-gated error handling
Structs§
Functions§
- create_
dir - Creates a new, empty directory at the provided path
- create_
dir_ all - Recursively create a directory and all of its parent components if they are missing.
- create_
file - Create an empty file if it doesn’t already exist
- metadata
- Given a path, queries the file system to get information about a file, directory, etc.
- read
- Reads the entire contents of a file into a bytes vector.
- read_
dir - Returns an iterator over the entries within a directory.
- read_
to_ string - Reads the entire contents of a file into a string.
- remove_
dir - Removes an empty directory.
- remove_
dir_ all - Removes a directory at this path, after removing all its contents. Use carefully!
- remove_
file - Removes a file from the filesystem.
- rename
- Renames a file or directory to a new name, replacing the original file if
toalready exists. - set_
permissions - Changes the permissions found on a file or a directory.
- write
- Writes a slice as the entire contents of a file.