我现在有个问题。我想读取budle目录中文件名中有空格的文件内容,如"a b.txt“。如何做到这一点?
之前谢谢你了。致以问候。
发布于 2011-09-12 13:53:33
NSString* filePath= [[NSBundle mainBundle] pathForResource:@"a b" ofType:@"txt"];
NSString* txt= [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];文件名中的空格应该不会造成问题。
https://stackoverflow.com/questions/7383772
复制相似问题