Skip to content

FsMetadata

Metadata about a filesystem as a whole.

Returned by fs_metadata, Path.fs_metadata, and File.fs_metadata. For metadata about a single file entry, use Metadata.

Accessing a field that does not apply to the target platform raises FieldError.

Fields

available @ Int

Free space available to the current process in bytes.

block_size @ (Int | nil)

Filesystem block size in bytes when available.

blocks @ Int

Total data blocks. Unix only.

blocks_available @ Int

Free data blocks available to unprivileged users. Unix only.

blocks_free @ Int

Free data blocks, including reserved blocks. Unix only.

capacity @ Int

Total filesystem capacity in bytes.

component_length_max @ Int

Maximum path component length for the volume. Windows only.

files @ Int

Total file nodes. Unix only.

files_available @ Int

Free file nodes available to unprivileged users. Unix only.

files_free @ Int

Free file nodes. Unix only.

fragment_size @ Int

Filesystem fragment size in bytes. Unix only.

free @ Int

Total free space in bytes, including space reserved from unprivileged users.

freebsd_attrs @ Int

Raw FreeBSD filesystem mount attribute mask. Unix only.

fsid @ (Int | nil)

Raw filesystem identifier when the platform reports one. Unix only.

linux_attrs @ Int

Raw Linux filesystem mount attribute mask. Unix only.

macos_attrs @ Int

Raw macOS filesystem mount attribute mask. Unix only.

name_max @ Int

Maximum filename length. Unix only.

no_atime @ Bool

Whether access time updates are disabled. Unix only.

no_dev @ Bool

Whether device files are disabled. Unix only.

no_dir_atime @ Bool

Whether directory access time updates are disabled. Unix only.

no_exec @ Bool

Whether execution is disabled. Unix only.

no_suid @ Bool

Whether setuid execution is disabled. Unix only.

read_only @ Bool

Whether the filesystem is mounted read-only.

relatime @ Bool

Whether relative-atime updates are enabled. Unix only.

synchronous @ Bool

Whether writes are synchronous. Unix only.

volume_serial_number @ Int

Raw Windows volume serial number. Windows only.

win_flags @ Int

Raw Windows volume flags. Windows only.