directory size
directory size
- Subject: directory size
- From: Chris Long <email@hidden>
- Date: Fri, 7 Mar 2003 16:19:37 -0700
Does anyone know what would be wrong with this?
I am trying to get the size of a directory but I think the
directoryDictionary is storing something other than the directory size.
My values come out very small, like
NSNumber *directorySize;
NSDirectoryEnumerator *direnum = [[NSFileManager defaultManager]
enumeratorAtPath:@"/Applications"];
NSDictionary *directoryDictionary = [direnum directoryAttributes];
if (directorySize = [directoryDictionary objectForKey:NSFileSize])
NSLog(@"Directory size: %@", directorySize);
I chose /Applications for testing purposes and using either
/Applications or /Applications/ results in the same small value, in my
case was 1666 when the actual size is about 733466624. Both in bytes.
Thanks in advance,
Chris Long
_______________________________________________
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.