// 下面代码为打开弹框,效果图如下:
- (IBAction)buttonClicked:(id)sender {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentPath = [paths firstObject];
NSString *cachePath = nil;
NSFileManager *manager = [NSFileManager defaultManager] ;
if (![manager fileExistsAtPath:documentPath]) {
NSLog(@"没有文件");
}else {
NSEnumerator *childFilesEnumerator = [[manager subpathsAtPath:documentPath ] objectEnumerator];
NSString *fileName = nil;
while ((fileName = [childFilesEnumerator nextObject]) != nil ){
NSString* fileAbsolutePath = [documentPath stringByAppendingPathComponent:fileName];
BOOL isDirectory = NO;
NSLog(@"filePath %@", fileName);
cachePath = [NSString st