2022-04-07 07:13:40 -07:00
|
|
|
//
|
2023-02-27 04:55:47 -08:00
|
|
|
// FileManagerLiveKey.swift
|
2022-04-07 07:13:40 -07:00
|
|
|
// secant-testnet
|
|
|
|
//
|
2022-11-17 03:25:55 -08:00
|
|
|
// Created by Lukáš Korba on 15.11.2022.
|
2022-04-07 07:13:40 -07:00
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
2022-11-17 03:25:55 -08:00
|
|
|
extension FileManagerClient {
|
|
|
|
static let live = FileManagerClient(
|
2022-04-07 07:13:40 -07:00
|
|
|
url: { searchPathDirectory, searchPathDomainMask, appropriateForURL, shouldCreate in
|
|
|
|
try FileManager.default.url(for: searchPathDirectory, in: searchPathDomainMask, appropriateFor: appropriateForURL, create: shouldCreate)
|
|
|
|
},
|
|
|
|
fileExists: { path in
|
|
|
|
FileManager.default.fileExists(atPath: path)
|
|
|
|
},
|
|
|
|
removeItem: { url in
|
|
|
|
try FileManager.default.removeItem(at: url)
|
|
|
|
}
|
|
|
|
)
|
|
|
|
}
|