[Pythonmac-SIG] where is xstat/rstat

John W Baxter jwblist@olympus.net
Fri, 15 Jun 2001 18:00:09 -0700


At 21:36 +0200 6/14/01, Jack Jansen wrote:
>... Hmm, the size of
>the resource fork is not so easy to determine, using MacOS.openrf()
>and seek()/tell() is the only way I can think of.

Well, an Apple event to the Finder asking for the size of the file will
return data fork plus resource fork [actual content size, not including
unused parts of allocation blocks...Finder calls the latter physical size
in AppleScript].  Subtracting data fork size should yield resource fork
size.

But openrf/seek/tell is almost certainly "better."  (Particularly since
Finder has various problems in this area with really large files, depending
on System version.)

  --John
-- 
John Baxter   jwblist@olympus.net      Port Ludlow, WA, USA