tarInfo             package:Rcompression             R Documentation

_G_e_t _t_a_b_l_e _o_f _c_o_n_t_e_n_t_s _o_f _a _g_z_i_p_p_e_d _t_a_r _f_i_l_e

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

     This function reads a gzipped tar file and, by default, returns
     information about each entry in the archive. As the archive is
     being read, when an entry is encountered a callback function (in
     R) or (C) routine  is invoked giving details about the entry. One
     can pass an R function to be invoked or the address of a C
     routine. The R function should accept arguments giving the name of
     the file (character string), entryType (character string), the
     time stamp on the entry (number of seconds from Jan 1, 1970
     00:00), and the size. The last argument is a  counter and should
     be ignored. It will be removed.

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

     tarInfo(filename, fun = tarListCallback(), data = NULL)

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

filename: the name of the gzipped tar file 

     fun: a function that is invoked for each entry in the archive as
          it is encountered with the entry name, type, time stamp and
          size. This can also be a list of functions with class
          'TarInfoCallback' with elements named 'callback' and '.ans'.
          One can also provide a native (C) routine to be invoked using
          'getNativeSymbolInfo(sym_name)$addres'. 

    data: an object that is passed to a a native routine passed via
          'fun'. If that argument is not a routine, then this is
          ignored.

_V_a_l_u_e:

     By default, the result is a data frame with a row for each entry
     in the archive and with columns file, type, timestamp and size. If
     one specifies a value for 'fun', the return value is 'fun' itself
     in the expectation that one can use that to get the result.

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

     Duncan Temple Lang using code in contrib/untgz/ from the
     zlib-1.2.3 distribution that was writtent by Pedro A. Aranda
     Gutierrez <paag@tid.es>, adapted to Unix by Jean-loup Gailly
     <jloup@gzip.org> and with  various fixes by Cosmin Truta
     <cosmint@cs.ubbcluj.ro>.

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

     zlib/contrib/untgz in the zlib-1.2.3 distribution.

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

     'tarExtract'

_E_x_a_m_p_l_e_s:

       filename = system.file("sampleData", "OmegahatXSL_0.2-0.tar.gz", package = "Rcompression")
       tarInfo(filename)

