Reputation: 1299
Is there any officially supported way of secure-deleting files in Mac OS X 10.5+?
if not, what about if I move all files (using NSFilemanager) to a common folder, and use srm: from a shell script. Would this delete all traces of a file, or would the file still be recoverable because of the move operation?
thanks in advance for any help/suggestions.
Upvotes: 3
Views: 731
Reputation: 97
you can refer to this book, where it dose secure file wipe in objective-c http://shop.oreilly.com/product/0636920023234.do
Upvotes: -2
Reputation: 10865
You can use:
NSError *err;
NSFileManager *fileManager = [[NSFileManager alloc] init];
[fileManager removeItemAtPath:path error:&err];
where path is a NSString
with the path of the file you want to delete.
Upvotes: 0
Reputation: 11594
AFAIK, move isn't going to copy the bytes, just change the pointers in the file system.
Upvotes: 1