discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug(s) in NSFileManager


From: Jens Alfke
Subject: Bug(s) in NSFileManager
Date: Tue, 28 Feb 2012 17:10:57 -0800

The semantics of -[NSFileManager createDirectoryAtPath:attributes:] are 
incompatible with Apple’s implementation. The GNUstep method creates 
intermediate directories; the Apple version doesn’t. (I know this behavior 
well, and the Apple docs agree with me, stating "The directory to be created 
must not yet exist, but its parent directory must exist.”.)

This in turn causes problems with the newer -createDirectoryAtPath: method that 
takes a withIntermediateDirectories: flag. If the flag is NO, it calls into the 
older method, assuming it won’t create intermediate directories; but it 
actually will.

—Jens


reply via email to

[Prev in Thread] Current Thread [Next in Thread]