Module std::fs
[−]
[src]
Filesystem manipulation operations
This module contains basic methods to manipulate the contents of the local
filesystem. All methods in this module represent cross-platform filesystem
operations. Extra platform-specific functionality can be found in the
extension traits of std::os::$platform`std::os::$platform`.
Structs
| DirEntry |
Entries returned by the |
| File |
A reference to an open file on the filesystem. |
| FileType |
An structure representing a type of file with accessors for each file type. |
| Metadata |
Metadata information about a file. |
| OpenOptions |
Options and flags which can be used to configure how a file is opened. |
| Permissions |
Representation of the various permissions on a file. |
| ReadDir |
Iterator over the entries in a directory. |
| DirBuilder |
[Unstable] A builder used to create directories in various manners. |
| WalkDir |
[Unstable] An iterator that recursively walks over the contents of a directory. |
Traits
| PathExt |
[Unstable] Utility methods for paths. |
Functions
| copy |
Copies the contents of one file to another. This function will also copy the permission bits of the original file to the destination file. |
| 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. |
| hard_link |
Creates a new hard link on the filesystem. |
| metadata |
Given a path, query the file system to get information about a file, directory, etc. |
| read_dir |
Returns an iterator over the entries within a directory. |
| read_link |
Reads a symbolic link, returning the file that the link points to. |
| remove_dir |
Removes an existing, 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 underlying filesystem. |
| rename |
Rename a file or directory to a new name. |
| set_permissions |
Changes the permissions found on a file or a directory. |
| soft_link |
[Deprecated] Creates a new symbolic link on the filesystem. |
| symlink_metadata |
Query the metadata about a file without following symlinks. |
| canonicalize |
[Unstable] Returns the canonical form of a path with all intermediate components normalized and symbolic links resolved. |
| set_file_times |
[Unstable] Changes the timestamps for a file's last modification and access time. |
| walk_dir |
[Unstable] Returns an iterator that will recursively walk the directory structure
rooted at |