Skip to content
CryoCryo home
StdlibSystem

fs

Filesystem access. File implements both Read and Write, so code already written against the I/O traits works against files with no glue.

public module fs::path;
public module fs::file;
public module fs::metadata;
public module fs::dir;
FileWhat it holdsImport
pathPath (borrowed) and PathBuf (owned)import std::fs::path;
fileFile, OpenOptions, and the whole-file helpers read, write, copyimport std::fs::file;
dirread_dir, create_dir, remove_file, rename, canonicalizeimport std::fs::dir;
metadataMetadata, FileType, metadata, existsimport std::fs::metadata;