From 689ea51b29edbcc3fac1406a0155cf8b36416af0 Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Wed, 5 Jul 2017 22:12:00 +0300 Subject: [PATCH] Update docs for entryAttributes properties. They now list what are possible values of keys of entryAttributes dictionary. --- Sources/TarContainer.swift | 19 ++++++++++++++++--- Sources/ZipContainer.swift | 12 ++++++++++-- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Sources/TarContainer.swift b/Sources/TarContainer.swift index 5bca0973..b94f0000 100644 --- a/Sources/TarContainer.swift +++ b/Sources/TarContainer.swift @@ -74,13 +74,26 @@ public class TarEntry: ContainerEntry { /** Provides a dictionary with various attributes of the entry. `FileAttributeKey` values are used as dictionary keys. - + - Note: - Will be renamed to `attributes` in 4.0. + Will be renamed in 4.0. + + ## Possible attributes: + + - `FileAttributeKey.posixPermissions`, + - `FileAttributeKey.ownerAccountID`, + - `FileAttributeKey.groupOwnerAccountID`, + - `FileAttributeKey.size`, + - `FileAttributeKey.modificationDate`, + - `FileAttributeKey.type`, + - `FileAttributeKey.ownerAccountName`, if format of container is UStar, + - `FileAttributeKey.groupOwnerAccountName`, if format of container is UStar. + + Most modern TAR containers are in UStar format. */ public let entryAttributes: [FileAttributeKey: Any] - /** + /** File mode. - Warning: diff --git a/Sources/ZipContainer.swift b/Sources/ZipContainer.swift index 34a15b37..ebb007a1 100644 --- a/Sources/ZipContainer.swift +++ b/Sources/ZipContainer.swift @@ -88,9 +88,17 @@ public class ZipEntry: ContainerEntry { /** Provides a dictionary with various attributes of the entry. `FileAttributeKey` values are used as dictionary keys. - + - Note: - Will be renamed to `attributes` in 4.0. + Will be renamed in 4.0. + + ## Possible attributes: + + - `FileAttributeKey.modificationDate` + - `FileAttributeKey.size` + - `FileAttributeKey.type`, only if origin OS was UNIX- or DOS-like. + - `FileAttributeKey.posixPermissions`, only if origin OS was UNIX-like. + - `FileAttributeKey.appendOnly`, only if origin OS was DOS-like. */ public let entryAttributes: [FileAttributeKey: Any]