summaryrefslogtreecommitdiff
path: root/ADSBDecoder/Utils.swift
diff options
context:
space:
mode:
Diffstat (limited to 'ADSBDecoder/Utils.swift')
-rw-r--r--ADSBDecoder/Utils.swift23
1 files changed, 23 insertions, 0 deletions
diff --git a/ADSBDecoder/Utils.swift b/ADSBDecoder/Utils.swift
new file mode 100644
index 0000000..7a7f177
--- /dev/null
+++ b/ADSBDecoder/Utils.swift
@@ -0,0 +1,23 @@
+//
+// Utils.swift
+// ADSBDecoder
+//
+// Created by Jacky Jack on 30/06/2024.
+//
+
+import Foundation
+
+//return true if file excists
+func checkIfFileExists(_ fname: String) -> Bool {
+ let fm = FileManager.default
+ if fm.fileExists(atPath: fname) {
+ return true
+ }
+ return false
+}
+
+//get current run directory
+func getCurrentDirPath() -> String {
+ return Process().currentDirectoryPath
+}
+