deep-node-fs

nodejs fs store for deep

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.

  • deepjs >= v0.9.4
  • node >= 0.10.0
    git clone https://github.com/deepjs/deep-node-fs
    cd deep-node-fs
    npm install
 
    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();
 
    //...