On 26/11/2012, at 9:44 AM, Tom Miller <t...@pxlc.me> wrote: > Thank you! Though this didn't quite work. I'm getting an error response in > the code telling me "No visible @interface for 'NSFileManger' declares the > selector 'createDirectoryAtURL:attributes'. Included in this message is the > code im playing with,
So, have you actually tried Sean's suggestion of using -createDirectoryAtURL:withIntermediateDirectories:attributes:error: ? You should also make your method -applicationSupportFolder return a NSURL not a path string. There's no good reason for new code to be using a deprecated method, and sticking with paths instead of URLs is not a good long-term strategy. I've just spent a lot of time moving a bunch of older code from path strings to URLs and it's a lot of work, so unless you have to support a much older version of OS X, use NSURL now. Also, as suggested, checking for the existence of the folder before trying to create it is considered a bad design pattern these days - the method will create the directory IF NECESSARY, and if not (i.e. it exists already) will gracefully return without error. --Graham _______________________________________________ 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