1.1.0 • Published 9 years ago

snr-fshelper v1.1.0

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

snr-fshelper

This ia a very simple and minimalistic abstraction on top of NodeJS fs library (actually, on top of promised-io/fs, which is a fs with Promeses)

API of this library is only three methods: getObject, createObject and deleteObject

getObject(path)

This method will accept a path and will return either Array of file names in the folder (in case it is a path to a folder) or a binary Buffer with file contents (in case it is a path to a file)

createObject(path, data)

This method will create a folder if no data will be supplied. Otherwise it will create a file containing data supplied in data argument

deleteObject(path)

This one is simple - it will delete a file or folder at given path

1.1.0

9 years ago

1.0.0

9 years ago