logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

zipfile::decode - Access to zip archives

Api

::zipfile::decode::archive
              This command decodes the last opened (and not yet closed) zip archive file.   The  result  of  the
              command  is  a dictionary describing the contents of the archive. The structure of this dictionary
              is not public. Proper access should be  made  through  the  provided  accessor  commands  of  this
              package.

       ::zipfile::decode::close
              This  command  releases  all  state associated with the last call of ::zipfile::decode::open.  The
              result of the command is the empty string.

       ::zipfile::decode::commentadict
              This command takes a dictionary describing the currently open zip archive  file,  as  returned  by
              ::zipfile::decode::archive, and returns the global comment of the archive.

       ::zipfile::decode::contentarchive
              This is a convenience command which decodes the specified zip archive file and returns the list of
              paths found in it as its result.

       ::zipfile::decode::copyfileadictpathdst
              This  command  takes  a  dictionary describing the currently open zip archive file, as returned by
              ::zipfile::decode::archive, and copies the decompressed contents of the file path in  the  archive
              to the the file dst.  An error is thrown if the file is not found in the archive.

       ::zipfile::decode::filesadict
              This  command  takes  a  dictionary describing the currently open zip archive file, as returned by
              ::zipfile::decode::archive, and returns the list of files found in the archive.

       ::zipfile::decode::getfilezdictpath
              This command takes a dictionary describing the currently open zip archive  file,  as  returned  by
              ::zipfile::decode::archive, and returns the decompressed contents of the file path in the archive.
              An error is thrown if the file is not found in the archive.

       ::zipfile::decode::hasfileadictpath
              This  command  takes  a  dictionary describing the currently open zip archive file, as returned by
              ::zipfile::decode::archive, and check if the specified path is found in the archive.   The  result
              of the command is a boolean flag, true if the path is found, and false otherwise.

       ::zipfile::decode::filesizezdictpath
              This  command  takes  a  dictionary describing the currently open zip archive file, as returned by
              ::zipfile::decode::archive, and returns the decompressed size of the file path in the archive.  An
              error is thrown if the file is not found in the archive.

       ::zipfile::decode::filecommentzdictpath
              This command takes a dictionary describing the currently open zip archive  file,  as  returned  by
              ::zipfile::decode::archive,  and returns the per-file comment of the file path in the archive.  An
              error is thrown if the file is not found in the archive.

       ::zipfile::decode::isziparchive
              This command takes the path of a presumed zip archive file and  returns  a  boolean  flag  as  the
              result of the command telling us if it actually is a zip archive (true), or not (false).

       ::zipfile::decode::openarchive
              This command takes the path of a zip archive file and prepares it for decoding.  The result of the
              command  is  the  empty string.  All important information is stored in global state.  If multiple
              open calls are made one after the other only the state of the last call is available to the  other
              commands.

       ::zipfile::decode::unzipadictdstdir
              This  command  takes  a  dictionary describing the currently open zip archive file, as returned by
              ::zipfile::decode::archive, and unpacks the archive in the  given  destination  directory  dstdir.
              The result of the command is the empty string.

       ::zipfile::decode::unzipfilearchivedstdir
              This  is  a  convenience  command  which  unpacks  the  specified  zip  archive  file in the given
              destination directory dstdir.

              The result of the command is the empty string.

Bugs, Ideas, Feedback

       This document, and the package it describes, will undoubtedly contain bugs and  other  problems.   Please
       report  such  in  the  category  zipfile  of  the TcllibTrackers [http://core.tcl.tk/tcllib/reportlist].
       Please also report any ideas for enhancements you may have for either package and/or documentation.

       When proposing code changes, please provide unifieddiffs, i.e the output of diff-u.

       Note further that attachments are strongly preferred over inlined patches. Attachments  can  be  made  by
       going  to the Edit form of the ticket immediately after its creation, and then using the left-most button
       in the secondary navigation bar.

Category

       File

Description

       Note:  packages Trf and zlibtcl are not required if TCL 8.6 is available.  This package provides commands
       to decompress and access the contents of zip archives.

Keywords

       decompression, zip

Name

       zipfile::decode - Access to zip archives

Synopsis

       package require Tcl8.59

       package require fileutil::decode0.2.1

       package require Trf

       package require zlibtcl

       package require zipfile::decode?0.10.1?::zipfile::decode::archive::zipfile::decode::close::zipfile::decode::commentadict::zipfile::decode::contentarchive::zipfile::decode::copyfileadictpathdst::zipfile::decode::filesadict::zipfile::decode::getfilezdictpath::zipfile::decode::hasfileadictpath::zipfile::decode::filesizezdictpath::zipfile::decode::filecommentzdictpath::zipfile::decode::isziparchive::zipfile::decode::openarchive::zipfile::decode::unzipadictdstdir::zipfile::decode::unzipfilearchivedstdir

________________________________________________________________________________________________________________

See Also