The aim of this module is to provide a very simple API to move content from/to a lot of different file systems. In a not-so-far future you would be able to write this:
// Copy from Amazon S3 to your Dropbox
# Using NPMnpm install every-stream
Or from source:
# Install from sourcesgit clone git://github.com/naholyr/node-every-stream.git every-streamcd every-streamnpm link
You can run unit tests:
npm test every-auth
Every-Stream is by design a simple bi-directional stream wrapper. The smart thing is the usage of DSN to define paths and use the proper driver.
var Stream = ;// Generic description of a source/destination// The following stream can be readable and/or writable,// depending on the driver and the way it's usedvar stream =// Example: copy "./file.txt" to a FTP server:
file:///path/to/file or directly
This is strictly equivalent to
This is a read-only driver, and it will emit filenames contained in the specified folder. This driver is equivalent to using
This driver is read-only in current version. I'm working on a full implementation to allow read-write with no issues. Further versions could enable "list" command when path ends with a trailing slash.
var FTPFile =// Download the fileFTPFile
HTTP(will be readonly, probably based on @mikael 's
Dropbox(and any other easy-to-use storage service)