Pathos API Documentation for Metadata
December 18, 2020 ยท View on GitHub
public struct Metadata
OS agnostic information about a file, besides the file itself.
Initializers
public init(
mode: UInt16,
size: UInt64,
atime: timespec,
mtime: timespec,
btime: timespec
)
Creates a Metadata from each individual values. This is only available on Linux.
public init(_ stat: stat)
Creates a Metadata from stat. This is only available on Darwin.
public init(_ data: WIN32_FIND_DATAW)
Creates a Metadata from WIN32_FIND_DATAW. This is only available on Windows.
Properties
let fileType: FileType
What does a path leads to.
let permissions: Permissions
What permission does current process has regarding the file.
let size: Int64
Length of the file's content in bytes.
let accessed: FileTime
Last time the file was accessed.
let modified: FileTime
Last time the file was modified.
let created: FileTime
Time of creation for the file.