starlib: Index | Files

package zipfile

import ""

Package zipfile reads & parses zip archives

outline: zipfile
  zipfile reads & parses zip archives

      opens an archive for reading

      a zip archive object
        namelist() list
          return a list of files in the archive
        open(filename string) ZipInfo
          open a file for reading
            filename string
              name of the file in the archive to open
        read() string
          read the file, returning it's string representation

Package zipfile defines zipfileimatical functions, it's intended to be a drop-in subset of python's zipfile module for starlark:


Package Files

doc.go zip.go


const ModuleName = ""

ModuleName defines the expected name for this Module when used in starlark's load() function, eg: load('', 'zipfile')

func LoadModule Uses

func LoadModule() (starlark.StringDict, error)

LoadModule loads the zipfile module. It is concurrency-safe and idempotent.

type ZipFile Uses

type ZipFile struct {

ZipFile is a starlark zip file

func (ZipFile) Struct Uses

func (zf ZipFile) Struct() *starlarkstruct.Struct

Struct turns zipFile into a starlark struct value

type ZipInfo Uses

type ZipInfo struct {

ZipInfo is a starlark information object for a Zip archive component

func (ZipInfo) Struct Uses

func (zi ZipInfo) Struct() *starlarkstruct.Struct

Struct turns zipInfo into a starlark struct value

Package zipfile imports 7 packages (graph) and is imported by 1 packages. Updated 2019-06-26. Refresh now. Tools for package owners.