Creating directories for save games
I need to be able to save the player's progress in the game. What is the preferred way of creating directories under OSX? I would prefer a C++ solution to this but if it has to be Cocoa then so be it. My basic assumption at this point is that it should be saved to ~/Library/Application Support/<game name> but how in code can you create a directory at that location?
For the POSIX way, man 2 mkdir
For the Cocoa way, see NSFileManager
mkdir man page Wrote:#include <sys/stat.h>
int
mkdir(const char *path, mode_t mode);
For the Cocoa way, see NSFileManager
NSFileManager documentation Wrote:- (BOOL)createDirectoryAtPath:(NSString *)path withIntermediateDirectories:(BOOL)createIntermediates attributes:(NSDictionary *)attributes error:(NSError **)error
I was using mkdir already so I guess I will stick with it.
Thanks for the reassurance.
Thanks for the reassurance.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Fullscreen GL with Save Panel on top | unknown | 7 | 3,705 |
Dec 12, 2006 09:41 PM Last Post: Frogblast |
|
| Open/Save As versus Import/Export? | WhatMeWorry | 1 | 3,135 |
Jan 15, 2006 09:33 PM Last Post: OneSadCookie |
|

