updateArchive          package:Rcompression          R Documentation

_A_d_d _t_h_e _c_o_n_t_e_n_t_s _t_o _a _z_i_p _f_i_l_e.

_D_e_s_c_r_i_p_t_i_o_n:

     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")'

     'updateArchiveFiles' is a higher-level function  that knows about
     XML files and is used for Office  Open file format. This function
     will  most likely be moved to  a different package in  the future,
     e.g. 'ROOXML'.

     '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.

     Why do we have 'dir' and 'fileNames'? The reason is that the file
     names identify the elements within the archive and so must be
     given without any prefix path. 'dir' serves as this prefix path.

_U_s_a_g_e:

     updateArchive(archive, fileNames, dir, verbose = FALSE,
                   zip = getOption("zip", "zip"))
     updateArchiveFiles(archive, doc, ..., .files = list(...),
                         zip = "zip -q",  dir = tempfile())

_A_r_g_u_m_e_n_t_s:

 archive: the ZipArchive object.

fileNames: the names of the files to be added the archive.  When this
          function is called, these should be files in the file system,
          located under 'dir'. Other, higher-level functions can work
          with  the contents directly rather than files. 

     dir: The directory in which to find the specified files.

 verbose: a logical value indicating whether to emit  information about
          the steps being performed.

     zip: a string identifying how to invoke the zip shell command

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

  .files: an alternative to ... which is useful when one already has
          the additional files in a list.

     doc: the document to be added, typically the central document of
          an Office Open file. The .files/... are the
          supporting/related files such as images, styles, etc. 

_A_u_t_h_o_r(_s):

     Duncan Temple Lang

_R_e_f_e_r_e_n_c_e_s:

     The zip command-line utility.

_S_e_e _A_l_s_o:

     'zipArchive'

