views:

28

answers:

1

I am writing many files to disk, and I would like to split them up into different categories, but how do I do this?

A: 

See following methods in NSFileManager class:

- (BOOL)createDirectoryAtPath:(NSString *)path attributes:(NSDictionary *)attributes
- (BOOL)createDirectoryAtPath:(NSString *)path withIntermediateDirectories:(BOOL)createIntermediates attributes:(NSDictionary *)attributes error:(NSError **)error

Note also that you cannot write anything into application bundle. Application sandbox however contains several folders where you can write (the choice between them depends on your needs). See "Commonly Used Directories" for more information.

Vladimir