JavaScript Editor Javascript validator     Web page editor 



Archive modification

Archive modification -- Remove and append files

Introduction

File_Archive version 1.3 introduces some new functions to edit existing archives. These functions will allow you to remove or append files to an existing archive.

Since for File_Archive, the file system is just another reader / writer, those modifications can be done on "real" archives (real files), or on nested archives (an archive inside another archive).

Remove files from an existing archive

To remove files from an archive, you'll use one of the following functions from File_Archive class:

Note that those functions will not recursively uncompress archives.

Appending files to an archive

To append files to an archive, you'll use one of the following functions from File_Archive class:

Both of these functions return a writer that you can use as in the previous examples, using the extract function

Note that if you use a string instead of a writer in a function, the string will be converted using File_Archive::appender(). Thus the previous example could be rewritten to:




JavaScript Editor Javascript validator     Web page editor