【发布时间】:2016-02-25 09:26:11
【问题描述】:
美好的一天
如何从完整路径中获取没有文件名的文件路径。 假设我有一条路径:
NSString *myPath = @"/Users/myName/Library/Developer/CoreSimulator/Devices/.../Library/Caches/Getting Started.pdf";
我只想拥有
NSString *newPath = @"/Users/myName/Library/Developer/CoreSimulator/Devices/.../Library/Caches";
我不想子串它,希望有更好的解决方案。
提前谢谢你。
【问题讨论】:
标签: objective-c