summaryrefslogtreecommitdiff
path: root/ADSBDecoder/Utils.swift
blob: 7a7f1773634ad72362b4b537dee300d4ef24db44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
}