Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

naveen.rv

macrumors newbie
Original poster
Jul 6, 2009
4
0
I am working on an application which stores data in a flat file, but the data in delicate, though i can encode it, i want these files NOT to be deleted by any other user, than the one created it, is this possible in cocoa programming in Objective-C.


Thank you.
 
I am working on an application which stores data in a flat file, but the data in delicate, though i can encode it, i want these files NOT to be deleted by any other user, than the one created it, is this possible in cocoa programming in Objective-C.

Check the Cocoa documentation for handling files; if you don't find anything, check out what Posix says. In the end, the administrator of the computer can delete any file.
 
Hey got it thanks :)

1. Use NSFileManager

2. Set the Attribute mask in the method

- (BOOL)changeFileAttributes:(NSDictionary *)attributes atPath:(NSString *)path;
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.