[Pythonmac-SIG] Accessing Resource forks

Christopher Barker Chris.Barker at noaa.gov
Sat Jul 14 00:56:16 CEST 2007


Hamish Allan wrote:
> Let me start by saying that I've never used MS services for Macintosh,
> so this is all guesswork. But the first thing I wondered was, if files
> uploaded over AFP aren't using ._* files, what are they using?

The server is storing the resource forks somewhere, but not anywhere we
can see them - who knows?

> Presumably the Windows machine isn't actually mounting an HFS or HFS+
> filesystem, so they're being stored somewhere "non-standard", in which
> case all bets for using FSRef are off anyway.

I'm only trying to use those after downloading the files via AFP. In my
test code, I'm using files created on the Mac they're being tested on,
so it should work, if I knew how.

> Proceeding with this assumption, could you perhaps compare the
> modification times of the ._* files with the files for which they
> store the resource fork, and if the latter has a more recent
> modification time the chances are that it has been overwritten using
> AFP?

Good idea, why didn't I think of that?

> That is to say, there are three cases:
> 
> 1) No ._* file is present: Either the resource fork is stored in
> non-standard place due to AFP or the file never had one -- download
> via AFP
> 2) ._* file is present and has same modification time as its
> counterpart -- download via SMB
> 3) ._* file is present and has later modification time than its
> counterpart -- download via AFP

Yup, that looks like a good option. I'll give it a try.

I'd still like to know how to get info in the Resource fork, however...

Thanks,

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov



More information about the Pythonmac-SIG mailing list