{"name":"level-filesystem","version":"1.1.0","description":"Full implementation of the fs module on top of 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-blobs":"^0.1.7","fwd-stream":"^1.0.4","xtend":"^2.2.0","level-peek":"^1.0.6"},"devDependencies":{"memdb":"^0.1.0","tape":"^2.12.0","memdown":"git://github.com/maxogden/memdown","levelup":"^0.18.2","browserify":"3.32.1"},"keywords":["leveldb","level","filesystem","fs","file","replacement"],"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"5f5f7c3551580eecd17766e0e65a954032831bac","bugs":{"url":"https://github.com/mafintosh/level-filesystem/issues"},"homepage":"https://github.com/mafintosh/level-filesystem","_id":"level-filesystem@1.1.0","_shasum":"dd9ae3f0d0b0a28cfea52c420ea53de3e4d8ac00","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"dist":{"shasum":"dd9ae3f0d0b0a28cfea52c420ea53de3e4d8ac00","tarball":"http://registry-npm.ywwl.com/level-filesystem/download/level-filesystem-1.1.0.tgz","integrity":"sha512-6Bn4s0vkOLz76iN4LHSBerF+694RcLMbkWNIWDUr5fqC18TXzT8S+Nk+aGflp/AvCUc1w8SiHGWQtVdAT/NzIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDjM96IolstWkio3R2HKOAi57MCK5ioqPqIAWxsKrH5sAiEA/kLbh81xzwIYUbSECeNzrc7+y+FhttZY5zWXwxeBkUI="}],"size":10679,"noattachment":false,"key":"/level-filesystem/-/level-filesystem-1.1.0.tgz"},"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":1413010314882,"_cnpm_publish_time":1413010314882,"dist-tags":{"latest":"1.2.0"}}