mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
[7-Zip] Move conversion from UInt64 to Date from entry to file info
This commit is contained in:
@@ -57,9 +57,9 @@ public struct SevenZipEntryInfo: ContainerEntryInfo {
|
||||
|
||||
self.name = file.name
|
||||
|
||||
self.accessTime = Date(file.aTime)
|
||||
self.creationTime = Date(file.cTime)
|
||||
self.modificationTime = Date(file.mTime)
|
||||
self.accessTime = file.aTime
|
||||
self.creationTime = file.cTime
|
||||
self.modificationTime = file.mTime
|
||||
|
||||
self.winAttributes = file.winAttributes
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ class SevenZipFileInfo {
|
||||
var isEmptyFile = false
|
||||
var isAntiFile = false
|
||||
var name: String = ""
|
||||
var cTime: UInt64?
|
||||
var mTime: UInt64?
|
||||
var aTime: UInt64?
|
||||
var cTime: Date?
|
||||
var mTime: Date?
|
||||
var aTime: Date?
|
||||
var winAttributes: UInt32?
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ class SevenZipFileInfo {
|
||||
else { throw SevenZipError.externalNotSupported }
|
||||
|
||||
for i in 0..<numFiles where timesDefined[i] == 1 {
|
||||
files[i].cTime = bitReader.uint64()
|
||||
files[i].cTime = Date(bitReader.uint64())
|
||||
}
|
||||
case 0x13: // Access time
|
||||
let timesDefined = bitReader.defBits(count: numFiles)
|
||||
@@ -89,7 +89,7 @@ class SevenZipFileInfo {
|
||||
else { throw SevenZipError.externalNotSupported }
|
||||
|
||||
for i in 0..<numFiles where timesDefined[i] == 1 {
|
||||
files[i].aTime = bitReader.uint64()
|
||||
files[i].aTime = Date(bitReader.uint64())
|
||||
}
|
||||
case 0x14: // Modification time
|
||||
let timesDefined = bitReader.defBits(count: numFiles)
|
||||
@@ -100,7 +100,7 @@ class SevenZipFileInfo {
|
||||
else { throw SevenZipError.externalNotSupported }
|
||||
|
||||
for i in 0..<numFiles where timesDefined[i] == 1 {
|
||||
files[i].mTime = bitReader.uint64()
|
||||
files[i].mTime = Date(bitReader.uint64())
|
||||
}
|
||||
case 0x15: // WinAttributes
|
||||
let attributesDefined = bitReader.defBits(count: numFiles)
|
||||
|
||||
Reference in New Issue
Block a user