download / upload files from / to a kappa-drive
ameba23 cece99af01 add LICENSE 2 years ago
test test, improve functions 2 years ago
LICENSE add LICENSE 2 years ago
README.md readme 2 years ago
index.js test, improve functions 2 years ago
package.json test, improve functions 2 years ago

README.md

kappa-drive-dump

dump local files into / out of a kappa-drive.

There is a bit of terminology problem here. I wanted to call this module ‘sync’ but i think syncing is a bit misleading since the replication has already happened and the content is already stored locally. similarly the terms ‘download’ / ‘upload’ imply that content is moving over a network which is quite possibly not the case with this module.

‘copy’ is probably more accurate. but dump is a great word

API

downloadFile (drive, file, destPath, opts, callback)

Download a single file from a kappa-drive

  • drive a kappa-drive instance
  • file the file, with path, in the kappa-drive to download
  • destPath the local directory to store the downloaded file
  • opts an object with properties
    • clobber - overwrite files on destination (default: false)

uploadFile (drive, file, destPath, opts, callback)

Upload a single file to a kappa-drive

  • drive a kappa-drive instance
  • file the local file to upload
  • destPath the path inside the kappa-drive to store the file
  • opts an object with properties
    • clobber - overwrite files on destination (default: false)

downloadPath (drive, srcPath, destPath, opts, callback)

Download a directory from a kappa-drive

  • drive a kappa-drive instance
  • srcPath the path in the kappa-drive to dowload ('' downloads the entire archive)
  • destPath the local directory to store downloaded files
  • opts an object with properties
    • clobber - overwrite files on destination (default: false)

uploadPath (drive, srcPath, destPath, opts, callback)

upload a directory to a kappa-drive

  • drive a kappa-drive instance
  • srcPath the local directory to upload
  • destPath the directory to store the file inside the kappa-drive
  • opts an object with properties
    • clobber - overwrite files on destination (default: false)