Commit 3bfb43b7 authored by Drew's avatar Drew

Swift 3 renaming is now slightly different

parent b3372a27
......@@ -92,26 +92,6 @@ 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)
......@@ -123,4 +103,13 @@ extension String {
return self.stringByReplacingOccurrencesOfString(str, withString: with)
}
}
#endif
//These parts are possibly? not yet implemented on OSX
#if os(OSX)
extension String {
func componentsSeparated(by string: String) -> [String] {
return self.components(separatedBy: string)
}
}
#endif
\ No newline at end of file
......@@ -330,7 +330,7 @@ final class ATllbuild : Tool {
//check for modulemaps
for product in linkWithProduct {
let productName = product.components(separatedBy: ".")[0]
let productName = product.componentsSeparated(by: ".")[0]
let moduleMapPath = workDirectory + "/products/\(productName).modulemap"
if manager.fileExists(atPath: moduleMapPath) {
/*per http://clang.llvm.org/docs/Modules.html#command-line-parameters, pretty much
......
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