The NSString
method -stringByDeletingLastPathComponent
does just that.
You can use it like this:
NSLog(@"%@", [@"/tmp/afolder" stringByDeletingLastPathComponent]);
And it will log /tmp
.
The NSString
method -stringByDeletingLastPathComponent
does just that.
You can use it like this:
NSLog(@"%@", [@"/tmp/afolder" stringByDeletingLastPathComponent]);
And it will log /tmp
.