diff --git a/Sources/TAR/TarEntryInfo.swift b/Sources/TAR/TarEntryInfo.swift index 5009f2a1..e1de9da7 100644 --- a/Sources/TAR/TarEntryInfo.swift +++ b/Sources/TAR/TarEntryInfo.swift @@ -98,6 +98,15 @@ public struct TarEntryInfo: ContainerEntryInfo { let blockStartIndex: Int + public init(name: String, type: ContainerEntryType) { + self.name = name + self.type = type + self.linkName = "" + // These properties are only used when entry is loaded from the container. + self.format = .pax + self.blockStartIndex = 0 + } + init(_ byteReader: ByteReader, _ global: TarExtendedHeader?, _ local: TarExtendedHeader?, _ longName: String?, _ longLinkName: String?) throws { self.blockStartIndex = byteReader.offset