Commit 1d34f85e authored by Drew's avatar Drew

Add NSFileManager again

parent e6c1b805
Subproject commit 3bf876c1625027f4b38bdfced847383bbf74ee4d
Subproject commit 1e79aacda726ab822979fe001643544b74a3f503
......@@ -92,6 +92,28 @@ extension NSFileManager {
//These parts of Swift 3 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 String {
func componentsSeparated(by separator: String) -> [String] {
return self.componentsSeparatedByString(separator)
......
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