aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Models/Hotline.swift
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-04-28 13:33:31 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-04-28 13:33:31 -0700
commit494d8dd03568cedda3a6c9bc86cd854f2bb857a9 (patch)
treebfe3eb80a5e47e4fa0b1f818f294cb7fbd4749fc /Hotline/Models/Hotline.swift
parent1a82975ad00bced8bba8cd6df6a9920a7ae93c61 (diff)
Add Get/Set file info
Diffstat (limited to 'Hotline/Models/Hotline.swift')
-rw-r--r--Hotline/Models/Hotline.swift11
1 files changed, 11 insertions, 0 deletions
diff --git a/Hotline/Models/Hotline.swift b/Hotline/Models/Hotline.swift
index 6b5e3a7..7c05778 100644
--- a/Hotline/Models/Hotline.swift
+++ b/Hotline/Models/Hotline.swift
@@ -440,6 +440,17 @@ final class Hotline: HotlineClientDelegate, HotlineFileClientDelegate {
}
}
}
+
+ @MainActor func fileDetails(_ fileName: String, path: [String], complete callback: ((FileDetails?) -> Void)? = nil) {
+ var fullPath: [String] = []
+ if path.count > 1 {
+ fullPath = Array(path[0..<path.count-1])
+ }
+
+ self.client.sendGetFileInfo(name: fileName, path: fullPath) { info in
+ callback?(info)
+ }
+ }
@MainActor func previewFile(_ fileName: String, path: [String], complete callback: ((PreviewFileInfo?) -> Void)? = nil) {
var fullPath: [String] = []