Structure
Header
public struct Header: Equatable, Codable
The ar
header.
This header is placed atop the contents of a file in the archive to provide information such as the size of the file, the file's name, it's permissions, etc.
Relationships
Conforms To
Codable
Equatable
Initializers
init(name:userID:groupID:mode:modificationTime:)
public init(
name: String,
userID: Int = 0,
groupID: Int = 0,
mode: UInt32 = 0o644,
modificationTime: Int
)
Properties
name
public internal(set) var name: String
The file's name. The name will be truncated to 16 characters if the archive's Variant
is common
.
userID
public private(set) var userID: Int = 0
The ID of the user the file belonged to when it was on the filesystem.
groupID
public private(set) var groupID: Int = 0
The ID of the group the file belonged to when it was on the filesystem.
modificationTime
public let modificationTime: Int
The last time this file was modified.
Use Int(myDate.timeIntervalSince1970)
to set modificationTime
from a Date
.
size
public internal(set) var size: Int = 0
The size if the file.
This variable is only set when reading in an archive header.