Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Delete-a-file/Objective-C/delete-a-file.m
Normal file
13
Task/Delete-a-file/Objective-C/delete-a-file.m
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
|
||||
// Pre-OS X 10.5
|
||||
[fm removeFileAtPath:@"input.txt" handler:nil];
|
||||
[fm removeFileAtPath:@"/input.txt" handler:nil];
|
||||
[fm removeFileAtPath:@"docs" handler:nil];
|
||||
[fm removeFileAtPath:@"/docs" handler:nil];
|
||||
|
||||
// OS X 10.5+
|
||||
[fm removeItemAtPath:@"input.txt" error:NULL];
|
||||
[fm removeItemAtPath:@"/input.txt" error:NULL];
|
||||
[fm removeItemAtPath:@"docs" error:NULL];
|
||||
[fm removeItemAtPath:@"/docs" error:NULL];
|
||||
Loading…
Add table
Add a link
Reference in a new issue