Skip to content

joehand/selective-archive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selective Archive

Selectively download files from a hyperdrive archive.

Example

  var archive = drive.createArchive(key, {sparse: true})
  var selectiveArchive = SelectiveArchive(archive)
  // Download txt files
  selectiveArchive.download(['**/*.txt'], function (err) {
    console.log('done downloading')
    process.exit(0)
  })

See example.js for full usage example.

Installation

npm install selective-archive

API

var selective = SelectiveArchive(archive)

Archive must a a hyperdrive archive with option sparse: true.

selective.download(anymatch_array, cb)

Download a selection of files, cb fires when download is finished.

anymatch_array can be a file list or any anymatch compatible search strings. The archive metadata is traversed and checked against matches before downloading.

License

MIT

About

selectively sync a hyperdrive archive

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published