1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

File Handling in Cocoa

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

  1. macrumors newbie

    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


    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. macrumors newbie

    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