From cc5272cd4be2ab55fa8411790082be408b586be9 Mon Sep 17 00:00:00 2001 From: Arturs Artamonovs Date: Tue, 2 Jul 2024 10:07:49 +0100 Subject: Make ADSBDecoder more modular. Integrate into LearnMapKit --- ADSBDecoder/Utils.swift | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ADSBDecoder/Utils.swift (limited to 'ADSBDecoder/Utils.swift') 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 +} + -- cgit v1.2.3