{"name":"hexo-fs","version":"0.1.0","keywords":["hexo","fs","file","file system"],"author":{"url":"http://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"hexo-fs@0.1.0","maintainers":[{"name":"tommy351","email":"tommy351@gmail.com"}],"homepage":"http://hexo.io/","bugs":{"url":"https://github.com/hexojs/fs/issues"},"dist":{"shasum":"edfe10c129261f8bfd9a7f41080805b6285e287e","tarball":"http://registry-npm.ywwl.com/hexo-fs/download/hexo-fs-0.1.0.tgz","integrity":"sha512-WLQgaYqyKqRZH1B/k9T5UZk2YkL3wXUUJNp4z2+H488qI3aQdhSfn4uR0HFLfeSAJC7vt9wT4CqjT99A3myz2w==","signatures":[{"sig":"MEQCIHWGCxT61XFxElrcBQZDshh3GvA8oIkCDUJrJceKSdemAiBRpJ0bzHJMejbagsQncKFckJFw4ORFaze/3mZnOOaubw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":5508,"noattachment":false,"key":"/hexo-fs/-/hexo-fs-0.1.0.tgz"},"main":"lib/fs","_from":".","_shasum":"edfe10c129261f8bfd9a7f41080805b6285e287e","engines":{"node":">= 0.10.0"},"gitHead":"5856484c1a692983ee31c49bc8a3795f14da6858","scripts":{"test":"gulp test"},"_npmUser":{"name":"tommy351","email":"tommy351@gmail.com"},"repository":{"url":"https://github.com/hexojs/fs","type":"git"},"_npmVersion":"2.1.8","description":"File system module for Hexo.","directories":{"lib":"./lib"},"_nodeVersion":"0.10.33","dependencies":{"bluebird":"^2.3.11","chokidar":"^0.12.0","hexo-util":"^0.1.0","graceful-fs":"^3.0.4"},"devDependencies":{"chai":"^1.9.1","gulp":"^3.8.9","mocha":"^2.0.1","rimraf":"^2.2.8","coveralls":"^2.11.2","gulp-mocha":"^2.0.0","gulp-jshint":"^1.8.6","gulp-istanbul":"^0.5.0","jshint-stylish":"^1.0.0","gulp-load-plugins":"^0.7.0"},"readme":"# hexo-fs\n\n[![CI](https://github.com/hexojs/hexo-fs/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/hexojs/hexo-fs/actions/workflows/ci.yml)\n[![NPM version](https://badge.fury.io/js/hexo-fs.svg)](https://www.npmjs.com/package/hexo-fs)\n[![Coverage Status](https://coveralls.io/repos/github/hexojs/hexo-fs/badge.svg)](https://coveralls.io/github/hexojs/hexo-fs)\n\nFile system module for [Hexo].\n\n## Features\n\n- Support for both Promise and callback interface.\n- Use [graceful-fs] to avoid EMFILE error and various improvements.\n- Use [chokidar] for consistent file watching.\n\n## Installation\n\n``` bash\n$ npm install hexo-fs --save\n```\n\n## Usage\n\n``` js\nconst fs = require('hexo-fs');\n```\n\n> Some methods in the original fs module are not listed below, but they're available in hexo-fs.\n\n### exists(path)\n\nTest whether or not the given `path` exists by checking with the file system.\n\n### existsSync(path)\n\nSynchronous version of `fs.exists`.\n\n### mkdirs(path)\n\nCreates a directory and its parent directories if they does not exist.\n\n### mkdirsSync(path)\n\nSynchronous version of `fs.mkdirs`.\n\n### writeFile(path, data, [options])\n\nWrites data to a file.\n\nOption | Description | Default\n--- | --- | ---\n`encoding` | File encoding | utf8\n`mode` | Mode | 438 (0666 in octal)\n`flag` | Flag | w\n\n### writeFileSync(path, data, [options])\n\nSynchronous version of `fs.writeFile`.\n\n### appendFile(path, data, [options])\n\nAppends data to a file.\n\nOption | Description | Default\n--- | --- | ---\n`encoding` | File encoding | utf8\n`mode` | Mode | 438 (0666 in octal)\n`flag` | Flag | w\n\n### appendFileSync(path, data, [options])\n\nSynchronous version of `fs.appendFile`.\n\n### copyFile(src, dest, [callback])\n\nCopies a file from `src` to `dest`.\n\n### copyDir(src, dest, [options])\n\nCopies a directory from `src` to `dest`. It returns an array of copied files.\n\nOption | Description | Default\n--- | --- | ---\n`ignoreHidden` | Ignore hidden files | true\n`ignorePattern` | Ignore files which pass the regular expression |\n\n### listDir(path, [options])\n\nLists files in a directory.\n\nOption | Description | Default\n--- | --- | ---\n`ignoreHidden` | Ignore hidden files | true\n`ignorePattern` | Ignore files which pass the regular expression |\n\n### listDirSync(path, [options])\n\nSynchronous version of `fs.listDir`.\n\n### readFile(path, [options])\n\nReads the entire contents of a file.\n\nOption | Description | Default\n--- | --- | ---\n`encoding` | File encoding | utf8\n`flag` | Flag | r\n`escape` | Escape UTF BOM and line ending in the content | true\n\n### readFileSync(path, [options])\n\nSynchronous version of `fs.readFile`.\n\n### emptyDir(path, [options])\n\nDeletes all files in a directory. It returns an array of deleted files.\n\nOption | Description | Default\n--- | --- | ---\n`ignoreHidden` | Ignore hidden files | true\n`ignorePattern` | Ignore files which pass the regular expression |\n`exclude` | Ignore files in the array |\n\n### emptyDirSync(path, [options])\n\nSynchronous version of `fs.emptyDir`.\n\n### rmdir(path)\n\nRemoves a directory and all files in it.\n\n### rmdirSync(path)\n\nSynchronous version of `fs.rmdir`.\n\n### watch(path, [options])\n\nWatches changes of a file or a directory.\n\nSee [Chokidar API](https://github.com/paulmillr/chokidar#api) for more info.\n\n### ensurePath(path)\n\nEnsures the given path is available to use or appends a number to the path.\n\n### ensurePathSync(path)\n\nSynchronous version of `fs.ensurePath`.\n\n### ensureWriteStream(path, [options])\n\nCreates the parent directories if they does not exist and returns a writable stream.\n\n### ensureWriteStreamSync(path, [options])\n\nSynchronous version of `fs.ensureWriteStream`.\n\n## License\n\nMIT\n\n[graceful-fs]: https://github.com/isaacs/node-graceful-fs\n[Hexo]: https://hexo.io/\n[chokidar]: https://github.com/paulmillr/chokidar","publish_time":1420802766472,"_cnpm_publish_time":1420802766472,"dist-tags":{"latest":"5.0.1","legacy":"2.0.1"}}