本地文件
-(NSMutableDictionary *)localFile { NSString *path = [[NSBundle mainBundle] bundlePath]; NSFileManager *fm = [NSFileManager defaultManager]; NSDirectoryEnumerator *dirEnum = [fm enumeratorAtPath:path]; NSString *fileName; NSMutableDictionary *R = [NSMutableDictionary dictionary]; while (fileName = [dirEnum nextObject]) { NSLog(@"短路径:%@", fileName); NSLog(@"全路径:%@", [path stringByAppendingPathComponent:fileName]); if ([fileName hasSuffix:@".png"]) { NSString *key = [fileName componentsSeparatedByString:@"/"].lastObject; [R setObject:fileName forKey:key]; } } return R; }