Re: File Size and long longs...
Re: File Size and long longs...
- Subject: Re: File Size and long longs...
- From: Clark Cox <email@hidden>
- Date: Wed, 12 May 2004 20:00:13 -0400
On May 12, 2004, at 19:05, email@hidden wrote:
>
ok heres the code which opens a file seeks to then end to retrieve the
>
file size:
>
>
NSFileHandle *fh = [NSFileHandle fileHandleForReadingAtPath:file];
>
NSNumber *totalFileSize = [NSNumber numberWithUnsignedLongLong:[fh
>
seekToEndOfFile]];
>
[fh closeFile];
>
NSLog(@"%@ - %d",file,totalFileSize);
>
>
this is what is output in the log
>
>
2004-05-12 16:01:43.524 Rebuild Utility[1154] ABPerson.index - 3313088
>
>
the file's size in the finder is - 392 KB - 401,408 bytes
>
>
whats up? any help?
The former is the logical size (the number of bytes in the file), while
the latter is the physical size (the size, rounded up to the next full
allocation block, i.e. 4096 bytes).
--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.