When I call the following line of code, the returned value is always 102.
[[(NSFileManager*)manager attributesOfItemAtPath:[(NSURL*)file path] error:nil] objectForKey:@"NSFileSize"];
For the sake of demonstration, I'll NSLog the path and it's size.
Aperture (the path I ran through the code above) is actually 912MB.
What am I doing wrong here? I really appreciate your help. Thanks!
The .app
file is actually a special folder called an App Bundle. Folders (directories) only need to hold meta information for their content, so 102 bytes looks about right to me.
If you want the size of the binary then look at Aperature.app/Contents/MacOS/Aperature
, although the 912.5MB shown probably includes all the files in the bundle, not just the binary.