[Pythonmac-SIG] Resource forks and HFS-metadata
dshahbaz at fcoe.k12.ca.us
Wed Jan 18 22:03:00 CET 2006
Yes, I think I'm going to have to do this.
One question though, since you are using an external process to fix
the metadata anyway, why not just use ditto again to unzip, so you
could avoid the extra unzip step?
On Jan 18, 2006, at 8:40 AM, Charles Chandler wrote:
> I use ditto to create zips...
> openObj = popen2.Popen4('ditto -c -k --keepParent -sequesterRsrc ' +
> sourceFolderName + ' ' + targetZipName)
> ...then the zipfile method to unzip the files...
> data = theZipFile.read(relPathAndFileName)
> outfile = open(fullTargetName, "wb")
> ...then a Mac BSD call to rebuild the data and resource forks...
> popen2.popen2("/System/Library/CoreServices/FixupResourceForks \"" +
> destination + "\"")
> ...assuming that the developer tools are installed.
More information about the Pythonmac-SIG