blob: 53f43e3c12b5a58badf3899eaa523f80c4f09268 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/*
* See the IOSSIM_LICENSE file in this directory for the license on the source code in this file.
*/
#import "nsstringexpandpath.h"
@implementation NSString (ExpandPath)
- (NSString *)expandPath {
if ([self isAbsolutePath]) {
return [self stringByStandardizingPath];
} else {
NSString *cwd = [[NSFileManager defaultManager] currentDirectoryPath];
return [[cwd stringByAppendingPathComponent:self] stringByStandardizingPath];
}
}
@end
|