Skip to main content

FsCapabilities

Struct FsCapabilities 

Source
pub struct FsCapabilities {
Show 13 fields pub read_only: bool, pub case_sensitive: bool, pub case_preserving: bool, pub max_filename_len: usize, pub max_path_len: usize, pub supports_symlinks: bool, pub supports_hardlinks: bool, pub supports_sparse_files: bool, pub max_file_size: u64, pub supports_xattr: bool, pub supports_acl: bool, pub supports_nanoseconds: bool, pub supports_crtime: bool,
}
Expand description

Filesystem capabilities.

These flags describe what features a filesystem supports. The VFS layer uses this information to:

  • Reject unsupported operations early
  • Adapt behavior (e.g., case sensitivity)
  • Provide accurate information to applications

Fields§

§read_only: bool

Filesystem is read-only (no write operations allowed)

§case_sensitive: bool

Filesystem is case-sensitive (Linux default)

§case_preserving: bool

Filesystem preserves case even if not case-sensitive

§max_filename_len: usize

Maximum filename length in bytes

§max_path_len: usize

Maximum full path length in bytes

§supports_symlinks: bool

Supports symbolic links

§supports_hardlinks: bool

Supports hard links

§supports_sparse_files: bool

Supports sparse files (holes in files)

§max_file_size: u64

Maximum file size in bytes

§supports_xattr: bool

Supports extended attributes (xattr)

§supports_acl: bool

Supports POSIX ACLs

§supports_nanoseconds: bool

Supports sub-second timestamp precision

§supports_crtime: bool

Supports creation/birth time (crtime)

Implementations§

Source§

impl FsCapabilities

Source

pub const fn read_only_linux() -> Self

Create capabilities for a typical read-only Linux filesystem.

Source

pub const fn writable_linux() -> Self

Create capabilities for a writable Linux filesystem.

Source

pub const fn xfs() -> Self

Create default XFS capabilities.

Source

pub const fn ext4() -> Self

Create default ext4 capabilities.

Source

pub const fn btrfs() -> Self

Create default btrfs capabilities.

Source

pub const fn can_write(&self) -> bool

Check if write operations are allowed.

Trait Implementations§

Source§

impl Clone for FsCapabilities

Source§

fn clone(&self) -> FsCapabilities

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FsCapabilities

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FsCapabilities

Source§

fn default() -> Self

Implements default.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.