aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMNSString+FindFolder.m
diff options
context:
space:
mode:
Diffstat (limited to 'Foundation/GTMNSString+FindFolder.m')
-rw-r--r--Foundation/GTMNSString+FindFolder.m24
1 files changed, 12 insertions, 12 deletions
diff --git a/Foundation/GTMNSString+FindFolder.m b/Foundation/GTMNSString+FindFolder.m
index 1e1b50a..c6734d6 100644
--- a/Foundation/GTMNSString+FindFolder.m
+++ b/Foundation/GTMNSString+FindFolder.m
@@ -6,9 +6,9 @@
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
-//
+//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -21,28 +21,28 @@
@implementation NSString (GTMStringFindFolderAdditions)
-+ (NSString *)gtm_stringWithPathForFolder:(OSType)theFolderType
++ (NSString *)gtm_stringWithPathForFolder:(OSType)theFolderType
inDomain:(short)theDomain
doCreate:(BOOL)doCreate {
-
+
NSString* folderPath = nil;
FSRef folderRef;
-
+
OSErr err = FSFindFolder(theDomain, theFolderType, doCreate, &folderRef);
if (err == noErr) {
-
- CFURLRef folderURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault,
+
+ CFURLRef folderURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault,
&folderRef);
if (folderURL) {
- folderPath = GTMCFAutorelease(CFURLCopyFileSystemPath(folderURL,
- kCFURLPOSIXPathStyle));
+ folderPath = GTMCFAutorelease(CFURLCopyFileSystemPath(folderURL,
+ kCFURLPOSIXPathStyle));
CFRelease(folderURL);
}
}
return folderPath;
}
-+ (NSString *)gtm_stringWithPathForFolder:(OSType)theFolderType
++ (NSString *)gtm_stringWithPathForFolder:(OSType)theFolderType
subfolderName:(NSString *)subfolderName
inDomain:(short)theDomain
doCreate:(BOOL)doCreate {
@@ -52,7 +52,7 @@
inDomain:theDomain
doCreate:doCreate];
if (parentFolderPath) {
-
+
// find the path to the subdirectory
subdirPath = [parentFolderPath stringByAppendingPathComponent:subfolderName];
@@ -70,7 +70,7 @@
NSError *error = nil;
attrs = [fileMgr attributesOfItemAtPath:parentFolderPath error:&error];
if (error) {
- _GTMDevLog(@"Error %@ getting attributes of %@",
+ _GTMDevLog(@"Error %@ getting attributes of %@",
error, parentFolderPath);
}
createdSubDir = [fileMgr createDirectoryAtPath:subdirPath