[英]How do I find filenames of files in my iPhones Documents folder?
How do I get the last part of the filename in the Documents folder on the iPhone SDK. 如何获取iPhone SDK上Documents文件夹中文件名的最后一部分。
/Users/user/Library/Application Support/iPhone Simulator/5.0/Applications/apptext/Documents/File.txt / Users /用户/图书馆/应用程序支持/ iPhone Simulator / 5.0 / Applications / apptext / Documents / File.txt
I want the part that says File.txt, and ignore the rest of the path, how would I do that using the iPhone SDK? 我想要显示File.txt的部分,而忽略其余的路径,如何使用iPhone SDK做到这一点?
NSString *path = "/Users/user/Library/Application Support/iPhone Simulator/5.0/Applications/apptext/Documents/File.txt"
NSString *name = [path lastPathComponent];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.