updateArchive: Add the contents to a zip file.

Description Usage Arguments Author(s) References See Also

Description

This function allows the caller to update the contents of a Zip archive, adding or overwriting existing entries within an archive, leaving others umodified.

It is often more convenient to use the [<- operator to add/update elements of an archive, e.g. archive[ c("a", "b") ] = list(I("Some text"), "myFile")

updateArchive currently works for zip files only, but it can be made generic and methods can be easily added for different types of archives (e.g. tar files) assuming the underlying functionality to add the files is available.

This function now (as of version 0.91-0 of this package) uses in-memory rather than temporary files and the external zip executable.

Usage

1
2
updateArchiveFiles(archive, values, replace = TRUE,
                    origVals = archive[,, mode = "raw"], ...)

Arguments

archive

the ZipArchive object.

values

a named list of entries to add. These are passed to zip.

replace

a logical value that controls whether existing elements in the archive with the same names as any being added are overwritten, i.e. replaced, or whether we just append values to the end of the archive regardless of name conflicts.

origVals

this is a parameter so that methods which need to retrieve all the entries in the zip file can pass these to other methods and avoid having to read them multiple times.

...

any additional, supporting files such as images, style files, etc. which are updated in the rels/ component of the document

Author(s)

Duncan Temple Lang

References

The zip command-line utility.

See Also

zipArchive


statwonk/Rcompression documentation built on May 30, 2019, 10:43 a.m.