Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

readzip

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

readzip

read zip archive in simplest possible way

    1.0.1latest

Version published
Maintainers
1
Yearly downloads
12,807
increased by168.21%

Weekly downloads

Changelog

Source

readzip v1.0.1

fix

  • fix(readzip) mode: cannot read from archive: set to rw-rw-rw

Readme

Source

Readzip License NPM version Dependency Status Build Status Coverage Status

Read zip archive in simplest possible way.

Install

npm i readzip

API

path contains information about current file, it has next methods:

  • isFile([name]) check if current entitiy is file, also compares path, when name passed;
  • isDirectory([name]) checks if current entity is directory, also compares path, when name passed;
  • openReadStream - promise, returns file stream;
  • stop - close archive file and break from traversing loop;

Also path has fields that can be used to get some information

  • name
  • size
  • date
  • mode
  • directory
  • type
  • owner
import readzip from 'readzip'; const archivePath = './hello.zip'; for await (const path of readzip(archivePath)) { const {name} = path; if (path.isFile()) { console.log('file:', name); } if (path.isDirectory()) { console.log('directory:', name); } }

Similar to info returned by readify.

  • redzip - work with zip archives as it is regular files and directories
  • readify - read directory content with file attributes: size, date, owner, mode
  • readbox - read file or directory from dropbox

License

MIT

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc