Avatar
Kishikawa Katsumi 12/4/2024 5:32 AM
このFileStatも日付がIntだったり微妙に低レベルなので実際はさらに public struct File: Hashable { public let name: String public var size: UInt64 { fileStat.size } public var isDirectory: Bool { fileStat.isDirectory } public var isHidden: Bool { fileStat.isHidden } public var isReadOnly: Bool { fileStat.isReadOnly } public var isSystem: Bool { fileStat.isSystem } public var isArchive: Bool { fileStat.isArchive } public var creationTime: Date { fileStat.creationTime } public var lastAccessTime: Date { fileStat.lastAccessTime } public var lastWriteTime: Date { fileStat.lastWriteTime } private let fileStat: FileStat init(fileInfo: FileDirectoryInformation) { name = fileInfo.fileName fileStat = FileStat(fileInfo) } } こいつを返します。