blob: b36481b5044eb704f14b85548990511d4504c829 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/*
* See the LICENSE file 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
|