pub struct FileLayout {
pub name: String,
pub extent: Extent,
pub file_type: FileType,
pub timestamps: Timestamps,
pub attributes: u32,
pub symlink_target: Option<String>,
}Expand description
File layout with pre-calculated extent (for metadata-only writing).
This structure describes where a file’s data is located on disk without containing the actual data. Used for operations that only need to write/update filesystem metadata.
Fields§
§name: StringFile name (without path).
extent: ExtentLocation and size of file data on disk.
file_type: FileTypeType of the file entry.
timestamps: TimestampsFile timestamps.
attributes: u32Filesystem-specific attribute flags.
symlink_target: Option<String>Optional symlink target (only valid if file_type is Symlink).
Implementations§
Source§impl FileLayout
impl FileLayout
Sourcepub fn with_timestamps(self, timestamps: Timestamps) -> Self
pub fn with_timestamps(self, timestamps: Timestamps) -> Self
Sets the timestamps.
Sourcepub fn with_attributes(self, attributes: u32) -> Self
pub fn with_attributes(self, attributes: u32) -> Self
Sets the attributes.
Sourcepub fn with_symlink_target(self, target: impl Into<String>) -> Self
pub fn with_symlink_target(self, target: impl Into<String>) -> Self
Sets the symlink target (only meaningful for symlinks).
Trait Implementations§
Source§impl Clone for FileLayout
impl Clone for FileLayout
Source§fn clone(&self) -> FileLayout
fn clone(&self) -> FileLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FileLayout
impl RefUnwindSafe for FileLayout
impl Send for FileLayout
impl Sync for FileLayout
impl Unpin for FileLayout
impl UnsafeUnpin for FileLayout
impl UnwindSafe for FileLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more