Here is my method to remove a file from the temporary directory:
- (void)removeFileNamed:(NSString *)fileName
{
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:fileName];
[fileManager removeItemAtPath:filePath error:nil];
}
How can I change this code to remove EVERY file from the temporary directory (i.e. no parameter required)?
EDIT
The solution from the duplicate question solved the issue for me.