File Handling in Cocoa

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

  1. macrumors newbie

    Joined:
    Jul 6, 2009
    #1
    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. macrumors G5

    gnasher729

    Joined:
    Nov 25, 2005
    #2
    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. thread starter macrumors newbie

    Joined:
    Jul 6, 2009
    #3
    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