[Pythonmac-SIG] move/rename files w resource forks

Paul Berkowitz berkowit at silcom.com
Mon Nov 15 19:14:12 CET 2004

On 11/15/04 9:49 AM, "Mark Asbach" <mark.asbach at post.rwth-aachen.de> wrote:

> You could just use the 'mv' command or its python equivalent to move the
> resource fork: it's accessible transparently via 'filename/RSRC' throughout
> the whole Mac OS posix APIs. That means
> mv somefile newdirectory/
> test -d somefile/RSRC || mv somefile/RSRC newdirectory/
> will do everything necessary on Mac OS X and just ignore the rest of the
> second line on other systems.

Can you explain the first part (I don't know how this works on straight
Unix)? It looks to me as if this means that on non-Mac OS X systems all
files would be expected to have RSRC directories?? Or is it just that even
if the first part is false, the second part doesn't raise an error even
though somefile/RSRC  doesn't exist? No need to test without the -d switch?

Paul Berkowitz

More information about the Pythonmac-SIG mailing list