Commit 1e79aacd authored by Drew's avatar Drew

Add NSFileManager back

parent 516bc66e
Pipeline #1534 failed with stage
......@@ -50,6 +50,28 @@ extension NSString {
// These parts of the "great swift renaming" are not yet implemented on Linux
#if os(Linux)
extension NSFileManager {
func enumerator(atPath path: String) -> NSDirectoryEnumerator? {
return self.enumeratorAtPath(path)
}
func createSymbolicLink(atPath path: String, withDestinationPath destPath: String) throws {
return try self.createSymbolicLinkAtPath(path, withDestinationPath: destPath)
}
func createDirectory(atPath path: String, withIntermediateDirectories createIntermediates: Bool, attributes: [String : AnyObject]? = [:]) throws {
return try self.createDirectoryAtPath(path, withIntermediateDirectories: createIntermediates, attributes: attributes)
}
func attributesOfItem(atPath path: String) throws -> [String : Any] {
return try self.attributesOfItemAtPath(path)
}
func removeItem(atPath path: String) throws {
return try self.removeItemAtPath(path)
}
func fileExists(atPath path: String) -> Bool {
return self.fileExistsAtPath(path)
}
}
extension NSCharacterSet {
class func letters() -> NSCharacterSet {
return self.letterCharacterSet()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment