As Jonathan Steele points out, these are all gone now:
Removed String.fileSystemRepresentation() -> [CChar]Removed String.getFileSystemRepresentation(_: [CChar], maxLength: Int) -> BoolRemoved String.lastPathComponentRemoved String.pathComponentsRemoved String.pathExtensionRemoved String.pathWithComponents(_: [String]) -> String [static]Removed String.stringByAbbreviatingWithTildeInPathRemoved String.stringByAppendingPathComponent(_: String) -> StringRemoved String.stringByAppendingPathExtension(_: String) -> String?Removed String.stringByDeletingLastPathComponentRemoved String.stringByDeletingPathExtensionRemoved String.stringByExpandingTildeInPathRemoved String.stringByResolvingSymlinksInPathRemoved String.stringByStandardizingPathRemoved String.stringsByAppendingPaths(_: [String]) -> [String]
Easy enough to add
extension String { var ns : NSString {return self as NSString}}
and use it to force Foundation
"/Users/ericasadun/Desktop/initAllTheThings.txt".ns.lastPathComponent
4 Comments
Ah, but the question is, “Why?” Intentional or oversight? Nothing in the notes… Lots of threads on this in the forums, no one from Apple has chimed in yet
Where is the link: “Jonathan Steele points out”
No link. It’s a comment on the Beta 5 post
my guess is that they want to force people to use NSURL.URLByAppendingPathComponent() etc., since URLs are a more “correct” way of representing file paths.