Getting the "real" file size
Getting the "real" file size
- Subject: Getting the "real" file size
- From: Bryan Lund <email@hidden>
- Date: Mon, 30 Jun 2003 16:17:55 -0700
I am attempting to get the size of a file using something akin to the
following :
NSNumber *fsize;
NSFileManager *manager = [[NSFileManager alloc] init];
NSDictionary *fattrs = [manager fileAttributesAtPath:[@"path to file"]
traverseLink:NO];
fsize = [fattrs objectForKey:NSFileSize];
However NSFileSize returns the file size that you get when you do an
"ls -l" in the terminal...not the file size as reported by the Finder.
Oftentimes these sizes are quite different.
Is there any way to retrieve the file size for a file so that it
matches what is seen in the Finder?
Thanks!
-Bryan
_______________________________________________
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.