0.2.3 • Published 10 years ago

deep-node-fs v0.2.3

Weekly downloads
6
License
-
Repository
github
Last release
10 years ago

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();

	//...
0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago