updateArchive | R Documentation |
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.
updateArchiveFiles(archive, values, replace = TRUE,
origVals = archive[,, mode = "raw"], ...)
archive |
the ZipArchive object. |
values |
a named list of entries to add. These are passed to |
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 |
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 |
Duncan Temple Lang
The zip command-line utility.
zipArchive
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.