> >Call FSGetCatalogInfo and add dataPhysicalSize to rsrcPhysicalSize.
>
> Or, from the UNIX/POSIX side, use the 'stat()' system call,
> where several fields will help you:

Signature
If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>
> > >Call FSGetCatalogInfo and add dataPhysicalSize to rsrcPhysicalSize.
Thanks, I appreciate it, although since my experience is more Unix than
Carbon, I prefer:
> > Or, from the UNIX/POSIX side, use the 'stat()' system call,
> > where several fields will help you:
Thanks, that has the added benefit that I can do it from Perl if I need
to.
> Will that include the resource fork blocks?
Of course not, but knowing this, it's a simple matter to wrap a function
that stat()s both the path, and the path with "/..namedfork/rsrc"
appended, and returns the sum.

Signature
Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 2.0: Delocalize, Repair Permissions, lots more.
See http://www.atomicbird.com/
Miro Jurisic - 26 Sep 2004 23:52 GMT
> Of course not, but knowing this, it's a simple matter to wrap a function
> that stat()s both the path, and the path with "/..namedfork/rsrc"
> appended, and returns the sum.
FWIW, I am sure that calling stat twice is slower than calling FSGetCatalogInfo
once, but it's possible you don't care. Don't forget to use Unicode-savvy
functions for your path manipulations.
meeroh

Signature
If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>
Eric Albert - 27 Sep 2004 00:36 GMT
> > Of course not, but knowing this, it's a simple matter to wrap a function
> > that stat()s both the path, and the path with "/..namedfork/rsrc"
[quoted text clipped - 4 lines]
> once, but it's possible you don't care. Don't forget to use Unicode-savvy
> functions for your path manipulations.
If you're starting with a path and not with an FSRef, I'd expect the two
stats to be faster than constructing an FSRef and calling
FSGetCatalogInfo.
-Eric

Signature
Eric Albert ejalbert@cs.stanford.edu
http://outofcheese.org/
Tom Harrington - 27 Sep 2004 04:23 GMT
> > > Of course not, but knowing this, it's a simple matter to wrap a function
> > > that stat()s both the path, and the path with "/..namedfork/rsrc"
[quoted text clipped - 4 lines]
> > once, but it's possible you don't care. Don't forget to use Unicode-savvy
> > functions for your path manipulations.
Well, although I didn't mention it initially, the "I can also use stat()
in Perl" angle is more important than questions of speed in this case.
> If you're starting with a path and not with an FSRef, I'd expect the two
> stats to be faster than constructing an FSRef and calling
> FSGetCatalogInfo.
I would be starting with a path, regardless of whether I was using Perl
or C.

Signature
Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 2.0: Delocalize, Repair Permissions, lots more.
See http://www.atomicbird.com/