Plain,
folderPath is the path to your document directory.
NSString *folderPath; NSArray *dirContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:folderPath error:&error]; for (NSString *strName in dirContents) { [[NSFileManager defaultManager] removeItemAtPath:[folderPath stringByAppendingPathComponent:strName] error:&error]; }
Hope it will be helpful for you.
source share