From 4fd103b5de98d2f469b982677ea389e7ee7d64b3 Mon Sep 17 00:00:00 2001 From: "thomasvl@gmail.com" Date: Fri, 9 Jan 2009 20:34:30 +0000 Subject: - turned off _debug framework support in tests since we now capture a lot more in log validation. - Added GTM_SUPPORT_GC for controlling the inclusion of GC related code. - If you are using GTMUnitTestDevLog, it also tries to capture logs from NSAssert. - Added GTM_FOREACH_OBJECT/GTM_FOREACH_KEY that uses NSEnumerator and objectEnumerator/keyEnumerator on 10.4, but on 10.5+/iPhone uses FastEnumeration. - GTMNSWorkspace+Running gives a variety of ways of determining the attributes of running processes. --- Foundation/GTMNSFileManager+Path.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Foundation/GTMNSFileManager+Path.m') diff --git a/Foundation/GTMNSFileManager+Path.m b/Foundation/GTMNSFileManager+Path.m index 2d71729..195cd9e 100644 --- a/Foundation/GTMNSFileManager+Path.m +++ b/Foundation/GTMNSFileManager+Path.m @@ -17,6 +17,7 @@ // #import "GTMNSFileManager+Path.h" +#import "GTMDefines.h" @implementation NSFileManager (GMFileManagerPathAdditions) @@ -34,10 +35,9 @@ return YES; NSString *actualPath = @"/"; - NSEnumerator *directoryEnumerator = [[path pathComponents] objectEnumerator]; NSString *directory; - while ((directory = [directoryEnumerator nextObject])) { + GTM_FOREACH_OBJECT(directory, [path pathComponents]) { actualPath = [actualPath stringByAppendingPathComponent:directory]; if ([self fileExistsAtPath:actualPath isDirectory:&isDir] && isDir) { @@ -84,10 +84,9 @@ NSMutableArray *paths = [NSMutableArray arrayWithCapacity:[basenames count]]; NSString *basename; - NSEnumerator *basenamesEnumerator = [basenames objectEnumerator]; // Convert all the |basenames| to full paths. - while ((basename = [basenamesEnumerator nextObject])) { + GTM_FOREACH_OBJECT(basename, basenames) { NSString *fullPath = [directoryPath stringByAppendingPathComponent:basename]; [paths addObject:fullPath]; } -- cgit v1.2.3