{"name":"level-filesystem","version":"0.0.0","description":"(TO BE) A full implementation of the fs module in leveldb","repository":{"type":"git","url":"git://github.com:mafintosh/level-filesystem.git"},"dependencies":{"once":"^1.3.0","errno":"^0.1.1","concat-stream":"^1.4.4","level-sublevel":"^5.2.0","level-store":"^3.10.1"},"devDependencies":{"tap":"^0.4.8","memdb":"^0.1.0"},"scripts":{"test":"tap test/test-*.js"},"bugs":{"url":"https://github.com/mafintosh/level-filesystem/issues"},"homepage":"https://github.com/mafintosh/level-filesystem","_id":"level-filesystem@0.0.0","dist":{"shasum":"cbda2f53a8a239515f152413d3930445ce11f7c7","tarball":"http://registry-npm.ywwl.com/level-filesystem/download/level-filesystem-0.0.0.tgz","integrity":"sha512-8qpXNXumuxQgskNE33WfwwE19ofcbmnQYxLgwGsozvWlMRFCDtngp6ltvNbrCkejq4W7ycywpI6PwI34rCHiyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG7ki48C7sqDFDwp1AodcrBusXjdccqnWLBbQRIyaqo0AiAr30doKfVWSF8fVUTO6i9a9VMPoJsI1Lc8TTzoOorECQ=="}],"size":4636,"noattachment":false,"key":"/level-filesystem/-/level-filesystem-0.0.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{},"readme":"# level-filesystem\n\nFull implementation of the fs module on top of leveldb (except sync ops)\n\n\tnpm install level-filesystem\n\n[![build status](http://img.shields.io/travis/mafintosh/level-filesystem.svg?style=flat)](http://travis-ci.org/mafintosh/level-filesystem)\n![dat](http://img.shields.io/badge/Development%20sponsored%20by-dat-green.svg?style=flat)\n\n\n[![browser support](https://ci.testling.com/mafintosh/level-filesystem.png)\n](https://ci.testling.com/mafintosh/level-filesystem)\n\n## Current status\n\nAll async methods in the fs module are supported and well tested (including links!)\n\n```\n✓ fs.rmdir(path, callback)\n✓ fs.mkdir(path, [mode], callback)\n✓ fs.readdir(path, callback)\n✓ fs.stat(path, callback)\n✓ fs.exists(path, callback)\n✓ fs.chmod(path, mode, callback)\n✓ fs.chown(path, uid, gid, callback)\n✓ fs.rename(oldPath, newPath, callback)\n✓ fs.realpath(path, [cache], callback)\n✓ fs.readFile(filename, [options], callback)\n✓ fs.writeFile(filename, data, [options], callback)\n✓ fs.appendFile(filename, data, [options], callback)\n✓ fs.utimes(path, atime, mtime, callback)\n✓ fs.unlink(path, callback)\n✓ fs.createReadStream(path, [options])\n✓ fs.createWriteStream(path, [options])\n✓ fs.truncate(path, len, callback)\n✓ fs.watchFile(filename, [options], listener)\n✓ fs.unwatchFile(filename, [listener])\n✓ fs.watch(filename, [options], [listener])\n✓ fs.fsync(fd, callback)\n✓ fs.write(fd, buffer, offset, length, position, callback)\n✓ fs.read(fd, buffer, offset, length, position, callback)\n✓ fs.close(fd, callback)\n✓ fs.open(path, flags, [mode], callback)\n✓ fs.futimes(fd, atime, mtime, callback)\n✓ fs.fchown(fd, uid, gid, callback)\n✓ fs.ftruncate(fd, len, callback)\n✓ fs.fchmod(fd, mode, callback)\n✓ fs.fstat(fd, callback)\n✓ fs.lchown(path, uid, gid, callback)\n✓ fs.lchmod(path, mode, callback)\n✓ fs.symlink(srcpath, dstpath, [type], callback)\n✓ fs.lstat(path, callback)\n✓ fs.readlink(path, callback)\n✓ fs.link(srcpath, dstpath, callback)\n```\n\nIf any of the methods do not behave as you would expect please add a test case or open an issue.\n\n## Usage\n\n``` js\nvar filesystem = require('level-filesystem');\nvar fs = filesystem(db); // where db is a levelup instance\n\n// use fs as you would node cores fs module\n\nfs.mkdir('/hello', function(err) {\n\tif (err) throw err;\n\tfs.writeFile('/hello/world.txt', 'world', function(err) {\n\t\tif (err) throw err;\n\t\tfs.readFile('/hello/world.txt', 'utf-8', function(err, data) {\n\t\t\tconsole.log(data);\n\t\t});\n\t});\n});\n```\n\n## Errors\n\nWhen you get an error in a callback it is similar to what you get in Node core fs.\n\n``` js\nfs.mkdir('/hello', function() {\n\tfs.mkdir('/hello', function(err) {\n\t\tconsole.log(err); // err.code is EEXIST\n\t});\n});\n\nfs.mkdir('/hello', function() {\n\tfs.readFile('/hello', function(err) {\n\t\tconsole.log(err); // err.code is EISDIR\n\t});\n});\n\n...\n```\n\n## Relation to level-fs\n\nThe goal of this module is similar to [level-fs](https://github.com/juliangruber/level-fs) and is probably gonna end up as a PR to that module.\nI decided to make this as a standalone module (for now) since adding proper directory support to [level-fs](https://github.com/juliangruber/level-fs)\nturned out to be non-trivial (more or a less a complete rewrite).\n\n\n## License\n\nMIT\n","publish_time":1396121059781,"_cnpm_publish_time":1396121059781,"dist-tags":{"latest":"1.2.0"}}