Is there any API to check whether a file is a locked? I am not able to find any API in the NSFileManager class.Let me know if there is any API to check the lock of
NSFileManager
Following Code worked for me.
NSError * error; NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:&error]; BOOL isLocked = [[attributes objectForKey:NSFileImmutable] boolValue]; if (isLocked) { NSLog(@"File is locked"); }