On Jan 17, 2006, at 5:01 PM, Dimi Shahbaz wrote:

> My program deals with zip transferring archives.  I'm curious as to
> whether Python (namely the 'zip' and 'zipfile') modules can be made
> to be aware of resource forks and HFS-metadata?  Or is this a
> limitation of the zip format itself?  According to this (old) hint:
>
> http://www.macosxhints.com/article.php?story=20031118111144197
>
> I will have to have my program interact with `cpio` to preserve the
> metadata, which I'm trying to avoid.

You could certainly write code on top of the zipfile module that  
understands HFS metadata, since you have access to the zip directory  
and such.  However, I'm not sure that the way that Apple decided to  
extend the format is documented anywhere.  You'd have to look at the  
Darwin diffs for zip and unzip to see.

On Mac OS X 10.4, you could just run zip/unzip in a subprocess and  
they'd do the right thing.

-bob

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to