blob: 552ccff42620b8da8011c43cea2d2cd862f95d6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
import SwiftUI
//struct FilePreview: Identifiable, Hashable {
// let id: UUID
//
// let path: [String]
// let name: String
//
// let type: String
// let creator: String
// let fileSize: UInt
//
// let isFolder: Bool
// let isUnavailable: Bool
// var expanded: Bool = false
// var children: [FileInfo]? = nil
//
// init(hotlineFile: HotlineFile) {
// self.id = UUID()
// self.path = hotlineFile.path
// self.name = hotlineFile.name
// self.type = hotlineFile.type
// self.creator = hotlineFile.creator
// self.fileSize = UInt(hotlineFile.fileSize)
// self.isFolder = hotlineFile.isFolder
// self.isUnavailable = (!self.isFolder && (self.fileSize == 0))
//
// print(self.name, self.type, self.creator, self.isUnavailable)
// if self.isFolder {
// self.children = []
// }
// }
//
// static func == (lhs: FileInfo, rhs: FileInfo) -> Bool {
// return lhs.id == rhs.id
// }
//
// func hash(into hasher: inout Hasher) {
// hasher.combine(self.id)
// }
//}
|