Skip to content

Metadata

Unix file metadata.

Attribute getters return nil when unavailable or inapplicable.

Inherits from: fs.Metadata

Fields

append_only @ (Bool | nil) [get]

Whether the platform append-only flag is set.

archive @ (Bool | nil) [get]

Whether the archive attribute is set.

blksize @ Int [get]

Preferred block size for I/O.

blocks @ Int [get]

Number of allocated 512-byte blocks.

casefold @ (Bool | nil) [get]

Whether the case-insensitive-directory-lookups flag is set. Linux only.

data_journaling @ (Bool | nil) [get]

Whether the data-journaling flag is set. Linux

dev @ Int [get]

Device ID.

dir_sync @ (Bool | nil) [get]

Whether the synchronous-directory-updates flag is set. Linux only.

direct_access @ (Bool | nil) [get]

Whether the direct-access flag is set. Linux

extent_format @ (Bool | nil) [get]

Whether the extent-format flag is set. Linux

freebsd_attrs @ (Int | nil) [get]

Raw FreeBSD file flags. FreeBSD only.

gid @ Int [get]

Owner group ID.

group @ Int [get]

Owning group: the gid as an Int on Unix, or the primary group Sid on Windows.

This representation matches the group argument accepted by update_metadata.

hidden @ (Bool | nil) [get]

Whether the platform hidden flag is set.

immutable @ (Bool | nil) [get]

Whether the platform immutable flag is set.

ino @ Int [get]

Inode number.

linux_attrs @ (Int | nil) [get]

Raw Linux attribute flags. Linux only.

macos_attrs @ (Int | nil) [get]

Raw macOS file flags. macOS only.

mode @ Mode [get]

Permissions and file type.

nlink @ Int [get]

Hard-link count.

no_atime @ (Bool | nil) [get]

Whether the no-atime flag is set. Linux only.

no_compress @ (Bool | nil) [get]

Whether the don't-compress flag is set. Linux

no_copy_on_write @ (Bool | nil) [get]

Whether the no-copy-on-write flag is set. Linux

no_dump @ (Bool | nil) [get]

Whether the platform no-dump flag is set.

no_tail_merge @ (Bool | nil) [get]

Whether the no-tail-merging flag is set. Linux

offline @ (Bool | nil) [get]

Whether the offline attribute is set.

opaque @ (Bool | nil) [get]

Whether the opaque flag is set on macOS or FreeBSD.

owner @ Int [get]

Owner: the uid as an Int on Unix, or the owner Sid on Windows.

This representation matches the owner argument accepted by update_metadata.

project_inherit @ (Bool | nil) [get]

Whether the project-hierarchy flag is set. Linux

rdev @ Int [get]

Special-device ID.

readonly @ (Bool | nil) [get]

Whether the readonly attribute is set.

reparse_point @ (Bool | nil) [get]

Whether the reparse-point attribute is set.

secure_delete @ (Bool | nil) [get]

Whether the secure-deletion flag is set. Linux

sync @ (Bool | nil) [get]

Whether the synchronous-updates flag is set. Linux only.

system @ (Bool | nil) [get]

Whether the system attribute is set.

top_dir @ (Bool | nil) [get]

Whether the top-of-directory-hierarchy flag is set. Linux only.

uid @ Int [get]

Owner user ID.

undelete @ (Bool | nil) [get]

Whether the undeletable flag is set. Linux only.