ArArchiveKit Documentation

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.

%15 Header Header Equatable Equatable Header->Equatable Codable Codable Header->Codable

Conforms To

Codable
Equatable

Initializers

init(name:​user​ID:​group​ID:​mode:​modification​Time:​)

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.

user​ID

public private(set) var userID: Int = 0

The ID of the user the file belonged to when it was on the filesystem.

group​ID

public private(set) var groupID: Int = 0

The ID of the group the file belonged to when it was on the filesystem.

mode

public private(set) var mode: UInt32 = 0o644

The permissions of the file.

modification​Time

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.