NSFileManager deprecated

1 reply [Last post]
@RandyMcMillan
User offline. Last seen 10 years 42 weeks ago. Offline
Joined: 08/03/2010
Posts:

#pragma mark -
#pragma mark Database access

- (NSString *)applicationSupportDirectory;
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;

NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:basePath] == NO)
{

/// [fileManager createDirectoryAtPath:basePath attributes: nil];

[fileManager createDirectoryAtPath:basePath withIntermediateDirectories:NO attributes:nil error:nil];

}

return basePath;

AttachmentSize
Screen shot 2010-08-03 at 2.28.48 PM.png64 KB
Brad Larson
Brad Larson's picture
User offline. Last seen 4 years 22 weeks ago. Offline
Joined: 05/14/2008
Posts:

Yes, I noticed that when I was updating everything for iOS 4.0. That's fixed in my current build, which I'll post when I fix a couple of other bugs I've identified.

Syndicate content