glitch in my size code?
glitch in my size code?
- Subject: glitch in my size code?
- From: email@hidden
- Date: Mon, 10 May 2004 13:23:41 -0700
ok so this is the directory enumerator code i'm using
NSString *file;
NSDirectoryEnumerator *enumerator = [[NSFileManager
defaultManager] enumeratorAtPath:[object
stringByExpandingTildeInPath]];
while (file = [enumerator nextObject])
{
if (![[[file lastPathComponent] substringToIndex:1]
isEqualToString:@"."])
{
NSNumber *totalFileSize;
NSDictionary *fileSize = [manager
fileAttributesAtPath:file traverseLink:YES];
if (totalFileSize = [fileSize
objectForKey:NSFileSize])
total += [totalFileSize intValue];
NSLog(@"%@ - Total: %d",file,[totalFileSize
intValue]);
}
}
and this is what it returns??
2004-05-10 13:19:40.881 RU[560] ABPerson.index - Total: 0
2004-05-10 13:19:40.882 RU[560] ABPerson.skIndex - Total: 0
2004-05-10 13:19:40.882 RU[560] AddressBook.data - Total: 0
2004-05-10 13:19:40.882 RU[560] AddressBook.data.beforesave - Total: 0
2004-05-10 13:19:40.883 RU[560] AddressBook.data.previous - Total: 0
2004-05-10 13:19:40.884 RU[560] Images - Total: 0
2004-05-10 13:19:40.884 RU[560]
Images/04E2B77A-6111-11D8-B407-000A9577D556 - Total: 0
2004-05-10 13:19:40.885 RU[560]
Images/04EE7574-6111-11D8-B407-000A9577D556 - Total: 0
2004-05-10 13:19:40.885 RU[560]
Images/3A84D5B2-694F-11D8-8A10-000A9577D556 - Total: 0
2004-05-10 13:19:40.885 RU[560]
Images/3AC2EAD4-694F-11D8-8A10-000A9577D556 - Total: 0
2004-05-10 13:19:40.886 RU[560] Images/CachedMacDotComPhotos - Total: 0
all sizes are 0 which cant be right the total is 1.9 MB? what a i
doing wrong?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.