Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为了在 iPad 上保存文件,我需要sites/default/files/在以下路径字符串中获取文件名子字符串(在 之后):
sites/default/files/
sites/default/files/243347_TroubleShootingSqlserver20052008.pdf
我该怎么做?
设置你的路径NSURL *targetURL.,然后
NSURL *targetURL.
NSString *filename = [[targetURL path] lastPathComponent];
NSArray* pathURL = [path componentsSeparatedByString: @"/"]; NSString* pdfFileName = [pathURL objectAtIndex: [pathURL length]];