cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tuomo L <>
Subject Deleting original files after ZipArchiveSerialization
Date Mon, 15 Mar 2004 15:10:26 GMT

I'm using the ZipArchiveSerializer to zip up some files. I need to give
the user an option to check a box saying "Delete original files after
compression". I wrote a FileDeleteAction, which uses method to delete these
files. The action works separately just fine, but when trying to run it
inside the same request where ZipArchiveSerialization happens, I get an
error indicating that the file(s) couldn't  be deleted. It seems that they
are still locked for reading by the serializer.

Could someone please check, that the serializer closes all streams etc.
correctly, or what else might be the problem?

<map:match uri="">
  <map:generate src="some-entries.xml"/>
  <map:serialize type="zip"/>

<map:match uri="compress-and-delete">
  <map:act type="do-something-with-the-zip-file">
    <map:parameter name="src" value="cocoon:/"/>
    <map:act type="file-delete">
      <map:parameter name="src" value="path-to-the-originals"/>


View raw message