[Pythonmac-SIG] Re: Newbie Question: xstat() function?

Martin Miller mmiller@adobe.com
Wed, 16 Jan 2002 19:39:30 -0800


I discovered (by looking at the source code for some other Mac-specific
modules that come with the distribution), that I can use the
GetCreatorAndType() function in the MacOS module to accomplish what the
task. I tried it an it works fine.

I would still like to know about the xstat() function, if anyone knows
and cares to answer.

Thanks,
Martin


===============
Earlier I wrote:
> 
> I have a dumb newbie question. The documentation at
> <http://www.python.org/doc/current/mac/module-mac.html> for the
> MacPython mac module says:
> 
> ==snip==
> > One additional function is available:
> >
> > xstat(path)
> >        This function returns the same information as stat(), but with three additional values appended: the size of the resource fork of the file and its
> >        4-character creator and type.
> ==snip==
> 
> However the xstat() function does not appear to be available in either
> the "mac" or "os" module that is distributed with MacPython 2.2. I would
> like to access the 4-byte creator and type of a Macintosh file. Is it
> missing by mistake or am I doing something wrong? I have tried both
> mac.xstat(path) and os.xstat(path). I also tried the standard os.stat(),
> but it does not return any extra values as described.
> 
> TIA,
> Martin