mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-08 04:20:07 +02:00
24 lines
500 B
Swift
24 lines
500 B
Swift
//
|
|
// FileSystem.swift
|
|
// PHP Monitor
|
|
//
|
|
// Created by Nico Verbruggen on 07/12/2021.
|
|
// Copyright © 2021 Nico Verbruggen. All rights reserved.
|
|
//
|
|
|
|
import Cocoa
|
|
|
|
class Filesystem {
|
|
|
|
/**
|
|
Checks if a file exists at the provided path.
|
|
Uses `FileManager`.
|
|
*/
|
|
public static func fileExists(_ path: String) -> Bool {
|
|
return FileManager.default.fileExists(
|
|
atPath: path.replacingOccurrences(of: "~", with: "/Users/\(Paths.whoami)")
|
|
)
|
|
}
|
|
|
|
}
|