Skip to content

Commit b4e3ae3

Browse files
committed
Fix: FileItem initializer and st_mtime struct member access
1 parent c79c658 commit b4e3ae3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

lara/views/FileManagerView.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,21 @@ import SwiftUI
99
import Foundation
1010

1111
struct FileItem: Identifiable {
12-
let id: UUID = UUID()
12+
let id: UUID
1313
let name: String
1414
let path: String
1515
let isDirectory: Bool
1616
let size: UInt64
1717
let modifiedDate: Date
18+
19+
init(name: String, path: String, isDirectory: Bool, size: UInt64, modifiedDate: Date) {
20+
self.id = UUID()
21+
self.name = name
22+
self.path = path
23+
self.isDirectory = isDirectory
24+
self.size = size
25+
self.modifiedDate = modifiedDate
26+
}
1827
}
1928

2029
class FileListerPOSIX: NSObject {

0 commit comments

Comments
 (0)