Timespec
A time interval consisting of whole seconds and nanoseconds.
struct Timespec
A time interval consisting of whole seconds and nanoseconds.
struct Timespec
import _NIOFileSystem
A file system library for Swift.
struct FileInfo
Information about a file system object.
init(platformSpecificStatus: CInterop.Stat)
Creates a FileInfo
by deriving values from a platform-specific value.
init(type: FileType, permissions: FilePermissions, size: Int64, userID: UserID, groupID: GroupID, lastAccessTime: Timespec, lastDataModificationTime: Timespec, lastStatusChangeTime: Timespec)
Creates a FileInfo
from the provided values.
var groupID: GroupID
Group ID of the file.
var lastAccessTime: Timespec
The last time the file was accessed.
var lastDataModificationTime: Timespec
The last time the files data was last changed.
var lastStatusChangeTime: Timespec
The last time the status of the file was changed.
var permissions: FilePermissions
Permissions currently set on the file.
var platformSpecificStatus: CInterop.Stat? { get set }
The information about the file returned from the filesystem, if available.
var size: Int64
The size of the file in bytes.
var type: FileType
The type of the file.
var userID: UserID
User ID of the file.
struct GroupID
The numeric ID of a group.
struct UserID
The numeric ID of a user.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
init(seconds: Int, nanoseconds: Int)
static let now: FileInfo.Timespec
A timespec where the seconds are set to zero and the nanoseconds set to UTIME_NOW
. In syscalls such as futimens
, this means the time component set to this value will be be set to the current time or the largest value supported by the platform, whichever is smaller.
static let omit: FileInfo.Timespec
A timespec where the seconds are set to zero and the nanoseconds set to UTIME_OMIT
. In syscalls such as futimens
, this means the time component set to this value will be ignored.
var nanoseconds: Int
The number of nanoseconds.
var seconds: Int
The number of seconds.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
import _NIOFileSystemFoundationCompat
var date: Date { get }
The UTC time of the timestamp.