Created
March 17, 2016 07:00
-
-
Save antife-yinyue/8b7d2336434df83dd4e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Path { | |
static func basename(path: String) -> String { | |
return ((path as NSString).lastPathComponent as NSString).stringByDeletingPathExtension | |
} | |
static func dirname(path: String) -> String { | |
return (path as NSString).stringByDeletingLastPathComponent | |
} | |
static func extname(path: String) -> String { | |
return (path as NSString).pathExtension | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment