Created
November 18, 2013 15:38
-
-
Save kosso/7529870 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
-(NSString*)getNormalizedPath:(NSString*)source | |
{ | |
// NOTE: File paths may contain URL prefix as of release 1.7 of the SDK | |
if ([source hasPrefix:@"file:/"]) { | |
NSURL* url = [NSURL URLWithString:source]; | |
return [url path]; | |
} | |
// NOTE: Here is where you can perform any other processing needed to | |
// convert the source path. For example, if you need to handle | |
// tilde, then add the call to stringByExpandingTildeInPath | |
return source; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment