snr-fshelper

1.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i snr-fshelper

Weekly Downloads

4

Version

1.1.0

License

ISC

Last publish

Collaborators

  • alexfluger