summaryrefslogtreecommitdiff
path: root/ADSBDecoder/Utils.swift
diff options
context:
space:
mode:
authorArturs Artamonovs <arturs.artamonovs@protonmail.com>2024-07-02 10:07:49 +0100
committerArturs Artamonovs <arturs.artamonovs@protonmail.com>2024-07-02 10:07:49 +0100
commitcc5272cd4be2ab55fa8411790082be408b586be9 (patch)
tree8436c54cdeb94e6383607fe0028b09a19790e8d2 /ADSBDecoder/Utils.swift
parent58d9d561df35f88884b2959d2cf322f1ee69e3cd (diff)
downloadADSBDecoder-cc5272cd4be2ab55fa8411790082be408b586be9.tar.gz
ADSBDecoder-cc5272cd4be2ab55fa8411790082be408b586be9.zip
Make ADSBDecoder more modular. Integrate into LearnMapKit
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
+}
+