pub struct Attrs { /* private fields */ }Expand description
Idiomatic metadata returned by the Rust-native path API.
Implementations§
Source§impl Attrs
impl Attrs
Sourcepub fn present_mask(&self) -> AttrMask
pub fn present_mask(&self) -> AttrMask
Attribute fields actually returned by the backend, not merely requested.
Optional accessors remain None when a field was not requested or the
backend could not provide it. Check this mask before projecting the
metadata into an API that requires concrete values (such as stat).
Sourcepub fn absent_mask(&self, requested: AttrMask) -> AttrMask
pub fn absent_mask(&self, requested: AttrMask) -> AttrMask
Fields in requested that are absent from Self::present_mask.
Unknown requested bits are preserved in the result.
Sourcepub fn contains(&self, requested: AttrMask) -> bool
pub fn contains(&self, requested: AttrMask) -> bool
Whether every field in requested is present, not merely any field.
An empty mask is always contained.
Sourcepub fn mode(&self) -> Option<u32>
pub fn mode(&self) -> Option<u32>
Full POSIX mode, including the file type bits, when returned.
Sourcepub fn has_named_attributes(&self) -> Option<bool>
pub fn has_named_attributes(&self) -> Option<bool>
Whether named attributes exist, when the backend supplied this field.
pub fn file_type(&self) -> VfType
pub fn is_file(&self) -> bool
pub fn is_dir(&self) -> bool
pub fn is_symlink(&self) -> bool
Sourcepub fn len(&self) -> Option<u64>
pub fn len(&self) -> Option<u64>
Logical size, when SIZE was returned. Missing is distinct from zero.
pub fn is_empty(&self) -> Option<bool>
Sourcepub fn permissions(&self) -> Option<Permissions>
pub fn permissions(&self) -> Option<Permissions>
Permission bits, when MODE was returned. Missing is distinct from mode zero.
pub fn modified(&self) -> Option<SystemTime>
pub fn accessed(&self) -> Option<SystemTime>
Sourcepub fn changed(&self) -> Option<SystemTime>
pub fn changed(&self) -> Option<SystemTime>
POSIX status-change time; this is not a creation timestamp.
pub fn nlink(&self) -> Option<u32>
Sourcepub fn file_id(&self) -> Option<u64>
pub fn file_id(&self) -> Option<u64>
Backend file number, when returned; combine with Self::fs_id
rather than comparing this number across filesystems.
Sourcepub fn fs_id(&self) -> Option<u128>
pub fn fs_id(&self) -> Option<u128>
Backend filesystem ID, when returned. Pair it with file_id; it is not globally unique across servers or unrelated backend clients. NFS packs the FSID major part in the high 64 bits and minor part in the low.
Sourcepub fn fs_obj_id(&self) -> Option<FsObjId>
pub fn fs_obj_id(&self) -> Option<FsObjId>
The underlying filesystem object ID when both components were returned.