Skip to content

Metadata

Metadata about a single filesystem entry.

Returned by metadata, Path.metadata, and File.metadata. For filesystem-level capacity and mount metadata, use FsMetadata.

Platform-specific members belong to fs.unix.Metadata and fs.windows.Metadata. Unix attribute getters return nil when unavailable or inapplicable.

Fields

accessed @ time.DateTime [get]

Last access time.

compressed @ (Bool | nil) [get]

Whether the platform compressed flag is set.

created @ time.DateTime [get]

Creation time on Windows. On Unix, the time the file's metadata last changed, which is not its creation time.

group @ (Int | security.windows.Sid | nil) [get]

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

Missing Windows ownership returns nil. This representation matches the group argument accepted by update_metadata.

modified @ time.DateTime [get]

Last modification time.

owner @ (Int | security.windows.Sid | nil) [get]

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

Missing Windows ownership returns nil. This representation matches the owner argument accepted by update_metadata.

size @ Int [get]

File size in bytes.

type @ FileType [get]

File type.