File Handling in Cocoa

Discussion in 'Mac Programming' started by naveen.rv, Jul 8, 2009.

  1. naveen.rv macrumors newbie

    Jul 6, 2009
    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.
  2. gnasher729 macrumors P6


    Nov 25, 2005
    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.
  3. naveen.rv thread starter macrumors newbie

    Jul 6, 2009
    Hey got it thanks :)

    1. Use NSFileManager

    2. Set the Attribute mask in the method

    - (BOOL)changeFileAttributes:(NSDictionary *)attributes atPath:(NSString *)path;

Share This Page