1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-08 04:20:07 +02:00

👌 Wrote down some notes during Deep Dive

This commit is contained in:
2022-02-09 22:53:37 +01:00
parent a10e1cad11
commit 0fa6d337f2
3 changed files with 3 additions and 1 deletions

View File

@ -108,6 +108,7 @@ public class Shell {
Checks if a file exists at a certain path. Checks if a file exists at a certain path.
Used to be done with a shell command, now uses the native FileManager class instead. 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 { public static func fileExists(_ path: String) -> Bool {
let fullPath = path.replacingOccurrences(of: "~", with: "/Users/\(Paths.whoami)") let fullPath = path.replacingOccurrences(of: "~", with: "/Users/\(Paths.whoami)")
return FileManager.default.fileExists(atPath: fullPath) return FileManager.default.fileExists(atPath: fullPath)

View File

@ -23,6 +23,7 @@ class App {
} }
/** Whether the app is busy doing something. Used to determine what UI to display. */ /** Whether the app is busy doing something. Used to determine what UI to display. */
// TODO: Remove this, and always use PhpEnv.shared.isBusy
static var busy: Bool { static var busy: Bool {
return PhpEnv.shared.isBusy return PhpEnv.shared.isBusy
} }

View File

@ -24,7 +24,7 @@ class Valet {
/// Whether we're busy with some blocking operation. /// Whether we're busy with some blocking operation.
var isBusy: Bool = false var isBusy: Bool = false
/// When initialising the Valet singleton, extract the Valet version and assume no sites loaded. /// When initialising the Valet singleton assume no sites loaded. We will load the version later.
init() { init() {
self.version = nil self.version = nil
self.sites = [] self.sites = []