NSFileSize only returns nil or "6148"
NSFileSize only returns nil or "6148"
- Subject: NSFileSize only returns nil or "6148"
- From: Jaime Magiera <email@hidden>
- Date: Tue, 23 Jul 2002 23:11:31 -0400
I'm having a slight problem with my iteration of a directory. The first
iteration always returns a file size of "6148", no matter what file.
Every iteration after that returns "nil". The file name is right every
time so it seems to be iterating properly.
Here's the code. Can anyone spot a problem? Thanks.
-------------------------------------------
NSMutableDictionary *dict = [thePrefManager loadPreferences];
NSDirectoryEnumerator *direnum = [[NSFileManager defaultManager]
enumeratorAtPath:[dict objectForKey:@"uploadsFolderPath"]];
while (pname = [direnum nextObject]) {
NSDictionary *fileAttributes = [theManager
fileAttributesAtPath:pname traverseLink:false];
CFShow(pname);
if (fsize = [fileAttributes objectForKey:NSFileSize])
CFShow(fsize);
}
_______________________________________________
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.