Re: Creating directory at path, recursively

2008-11-13 Thread Randall Meadows
On Nov 13, 2008, at 11:21 AM, Quincey Morris wrote: On Nov 13, 2008, at 10:11, Etienne Guérard wrote: You might want to do it this way: - (void)createDirectoryRecursivelyAtPath:(NSString *)path { //check if the dir just above exists... NSFileManager *fileManager = [NSFileManager

Re: Creating directory at path, recursively

2008-11-13 Thread Jean-Nicolas Jolivet
hehe, thanks this is working fine... I knew it was going to be something obvious! :) Jean-Nicolas Jolivet On 13-Nov-08, at 1:11 PM, Etienne Guérard wrote: You might want to do it this way: - (void)createDirectoryRecursivelyAtPath:(NSString *)path { //check if the dir just above exi

Re: Creating directory at path, recursively

2008-11-13 Thread Sherm Pendley
On Nov 13, 2008, at 1:21 PM, Quincey Morris wrote: Or even this way: [[NSFileManager defaultManger] createDirectoryAtPath: path withIntermediateDirectories: YES attributes: nil error: &error]? That method is new in Leopard. Jean-Nicolas said he wants his app to work in Tiger as well. sh

Re: Creating directory at path, recursively

2008-11-13 Thread Jean-Nicolas Jolivet
This is exactly what I need, but it's only available on 10.5 or later, hence why I'm trying to put a simple equivalent together... JNJ On 13-Nov-08, at 1:21 PM, Quincey Morris wrote: On Nov 13, 2008, at 10:11, Etienne Guérard wrote: You might want to do it this way: - (void)createDirector

Re: Creating directory at path, recursively

2008-11-13 Thread Quincey Morris
On Nov 13, 2008, at 10:11, Etienne Guérard wrote: You might want to do it this way: - (void)createDirectoryRecursivelyAtPath:(NSString *)path { //check if the dir just above exists... NSFileManager *fileManager = [NSFileManager defaultManager]; BOOL isDir; NSStri

RE: Creating directory at path, recursively

2008-11-13 Thread Etienne Guérard
You might want to do it this way: - (void)createDirectoryRecursivelyAtPath:(NSString *)path { //check if the dir just above exists... NSFileManager *fileManager = [NSFileManager defaultManager]; BOOL isDir; NSString *directoryAbove = [path stringByDeletingLastPathCo