Expand description
File and file system access
Re-exportsΒ§
use std::borrow::Cow;πuse std::ffi::OsString;πuse std::fs;πuse std::fs::DirBuilder;πuse std::fs::File;πuse std::fs::FileTimes;πuse std::fs::OpenOptions;πuse std::fs::TryLockError;πuse std::io;πuse std::io::ErrorKind;πuse std::io::Read;πuse std::io::Seek;πuse std::io::SeekFrom;πuse std::io::Write;πuse std::path;πuse std::path::Path;πuse std::time::SystemTime;πuse rand::RngExt;πuse rustc_abi::Size;πuse rustc_data_structures::either::Either;πuse rustc_data_structures::fx::FxHashMap;πuse rustc_target::spec::Os;πuse self::shims::time::system_time_to_duration;πuse crate::shims::files::BIG_ACCESS;πuse crate::shims::files::DirHandle;πuse crate::shims::files::DynFileDescriptionRef;πuse crate::shims::files::EvalContextExt as _;πuse crate::shims::files::FdNum;πuse crate::shims::files::FileHandle;πuse crate::shims::files::open_file_or_dir;πuse crate::shims::os_str::PathConversion;πuse crate::shims::os_str::bytes_to_os_str;πuse crate::shims::sig::Varargs;πuse crate::shims::unix::fd::EvalContextExt as _;πuse crate::shims::unix::fd::FlockOp;πuse crate::shims::unix::fd::UnixFileDescription;πuse crate::shims::FdId;πuse crate::shims::FileDescription;πuse crate::*;π
StructsΒ§
- DirEntry π
- DirStream π
- An open directory stream (
DIR), tracked by DirTable. - DirTable
- The table of open directories. Curiously, Unix/POSIX does not unify this into the βfile descriptorβ conceptβ¦ everything is a file, except a directory is not?
- File
Metadata π - Stores a fileβs metadata in order to avoid code duplication in the different metadata related shims.
EnumsΒ§
- Time
Update π - What a
futimenstimespecasks for: leave the timestamp alone (UTIME_OMIT) or set it.
TraitsΒ§
FunctionsΒ§
- extract_
sec_ πand_ nsec - Extracts the number of seconds and nanoseconds elapsed between
timeand the unix epoch whentimeis Ok. ReturnsNoneiftimeis an error. Fails iftimehappens before the unix epoch. - file_
type_ πto_ mode_ name - host_
file_ πtimes_ from_ updates - The host
FileTimesthat applies the given access and modification time updates. - maybe_
sync_ πfile - same_
host_ πfile