mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-11-09 13:10:24 +01:00
👌 Wrote down some notes during Deep Dive
This commit is contained in:
@@ -108,6 +108,7 @@ public class Shell {
|
||||
Checks if a file exists at a certain path.
|
||||
Used to be done with a shell command, now uses the native FileManager class instead.
|
||||
*/
|
||||
// TODO: To be moved
|
||||
public static func fileExists(_ path: String) -> Bool {
|
||||
let fullPath = path.replacingOccurrences(of: "~", with: "/Users/\(Paths.whoami)")
|
||||
return FileManager.default.fileExists(atPath: fullPath)
|
||||
|
||||
Reference in New Issue
Block a user