diff --git a/Sources/InContextCore/Extensions/URL.swift b/Sources/InContextCore/Extensions/URL.swift index 0bdb746..b109b12 100644 --- a/Sources/InContextCore/Extensions/URL.swift +++ b/Sources/InContextCore/Extensions/URL.swift @@ -77,3 +77,26 @@ extension URL { } } + +#if os(Linux) + +enum DirectoryHint { + + case isDirectory + case notDirectory + +} + +extension URL { + + init(filePath: String, directoryHint: DirectoryHint = .notDirectory) { + self.init(fileURLWithPath: filePath, isDirectory: directoryHint == .isDirectory ? true : false) + } + + init(filePath: String, relativeTo url: URL?) { + self.init(fileURLWithPath: filePath, relativeTo: url) + } + +} + +#endif diff --git a/Sources/InContextCore/Utilities/ChangeObserver.swift b/Sources/InContextCore/Utilities/ChangeObserver.swift index 22c526d..15a519e 100644 --- a/Sources/InContextCore/Utilities/ChangeObserver.swift +++ b/Sources/InContextCore/Utilities/ChangeObserver.swift @@ -26,25 +26,6 @@ import Foundation import FSEventsWrapper #endif -enum DirectoryHint { - - case isDirectory - case notDirectory - -} - -extension URL { - - init(filePath: String, directoryHint: DirectoryHint = .notDirectory) { - self.init(fileURLWithPath: filePath, isDirectory: directoryHint == .isDirectory ? true : false) - } - - init(filePath: String, relativeTo url: URL?) { - self.init(fileURLWithPath: filePath, relativeTo: url) - } - -} - class ChangeObserver { let box: ConcurrentBox