deep-node-fs

0.2.3 • Public • Published

deep-node-fs provides simple wrappers that wrap nodejs asynch fs call (read and write) in a deep compliant (promised base) way.

Provided protocols (see deep protocols) :

- raw text file (or html)  (text:: or html::)
- json (json::)

It support File watching.

Required

  • deepjs >= v0.9.4
  • node >= 0.10.0

Install

    git clone https://github.com/deepjs/deep-node-fs
    cd deep-node-fs
    npm install

Usage

 
    require("deep-node-fs/json").createDefault();
 
    deep("json::./my/file.json") // relative to root node server path
    .log();
 
    //...
 
    deep.store("json")
    .post({ hello:"world" }, { id:"./my/path/to/output.json" })
    .log();
 
 
    //...
 
    deep.store.node.fs.JSON.create("myprotocol", __dirname+"/my/root/folder/");
 
    deep.store("myprotocol")
    .post({ hello:"stored json", id:"my/local/file/path.json"})
    .log();
 
    //...
 
    deep("myprotocol::my/local/file/path.json")
    .log();
 
    //...
 

Readme

Keywords

none

Package Sidebar

Install

npm i deep-node-fs

Weekly Downloads

1

Version

0.2.3

License

none

Last publish

Collaborators

  • nomocas