On 30.10.2012, at 19:17, Quincey Morris wrote: > On Oct 30, 2012, at 10:39 , Sean McBride <s...@rogue-research.com> wrote: > >> Note that in my experience YES is returned if the directory exists. > > It's also worth consulting the header file comments: > >> "createDirectoryAtPath:withIntermediateDirectories:attributes:error: creates >> a directory at the specified path. If you pass 'NO' for createIntermediates, >> the directory must not exist at the time this call is made. Passing 'YES' >> for 'createIntermediates' will create any necessary intermediate >> directories. This method returns YES if all directories specified in 'path' >> were created and attributes were set. […] This method returns NO if a >> failure occurs at any stage of the operation." > > There's a certain inscrutability to this, but it seems to suggest that > passing 'YES' for createIntermediates will allow the directory to already > exist (in effect, the directory is created as one of the "intermediates"), > while passing 'NO' requires the directory not to exist. >
Thanks for the hint to consult the headers. IMO, this clears it up -- and it works now as expected when parameter `createIntermediates` is set to `YES`. The need to consult the headers seems to become a standard task. But with clang's symbol lookup, it's a quite comfortable. ;) Andreas _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com