{"name":"hexo-fs","version":"2.0.1","keywords":["file","file system","fs","hexo"],"author":{"url":"http://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"hexo-fs@2.0.1","maintainers":[{"name":"abnerchou","email":"hi@abnerchou.me"},{"name":"curben","email":"bushedge@protonmail.com"},{"name":"ertrzyiks","email":"mateusz.derks@gmail.com"},{"name":"hexobot","email":"hexojs@gmail.com"},{"name":"jlhwung","email":"i@jhuang.me"},{"name":"tomap","email":"piartt@gmail.com"},{"name":"tommy351","email":"tommy351@gmail.com"},{"name":"yoshinorin","email":"nayo-msoft@outlook.jp"}],"homepage":"https://hexo.io/","bugs":{"url":"https://github.com/hexojs/hexo-fs/issues"},"dist":{"shasum":"abbdcadec067a8326d14b48e101935cf1a4f48e9","tarball":"http://registry-npm.ywwl.com/hexo-fs/download/hexo-fs-2.0.1.tgz","fileCount":4,"integrity":"sha512-IgAhdjYN3GCluy2MSeeX+F/RkyVsjjzZO7Bbhj3aYoSBqcJhJsR1Nz+Powp26siQPuIFLNNYjqmfPbVg2vg+Mg==","signatures":[{"sig":"MEYCIQDofCKLuJN7KwdFLYD5+k+lpJpAF2I2pAGvN8WUsw2CIAIhANwwP/jdrBCHI67FCqlUXheEXSJQdEJXDl3DlfxvW64w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23068,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevA1mCRA9TVsSAnZWagAAI7MP/1tU3R4pAuLpNtIprosu\njpK+KDVcwAhlyysv+4NzDCXNge5/4tRAsQ4NCOGnDx7Rrej7QyScK9BIWR+a\n3XfzbYLvdRfOCvCqqSvJ6QgkthEiCU76wPhFrWQxdDzzLWpcSmX5aIRYqOb4\n3r+Om0NozkDrTao2JZxihGT+UWBGlz91wMH+o1QO1v0qEKiKbIVh9guP0pjQ\nvNMYcu+z38BXQ3rb9tGinPlHzjVvRaJCbTc3Qh2F2Gm7/PAJ0pLhN2mjW8eh\nxa6XptfbWoN6jDXAlozKNJNQaHIt80JHcfmiYc1U081R/RUwwKk/PevNYSHB\nlMXMIeAmy0dtfCo+aBZQom0okz7LB9efpRa6CWjE+BnqAYLtQJfrYNwv1lEi\n4J7owSUk5Oy1xIAjDryKACAh6fjLwQeqB2NyPZ3cQ+NWUQJhE6z7yuh2w4+Y\nYfc/DxPLtc285YM7RSfl23zQCX5Cdvg61+IcpitOG74SWUHeWopJ4CXcySGx\n+huY2Z/Ol79BKcNmdWvORIfJ9LqfP/ru7P4OFZahyh3KxG8wTL6NP0ba/Wfn\nNIUPpPZo6O8uzw+8ngKG/s0YnmDrLlwnG5ijdVS+ennKztw0T+Sz+jO/2OxL\nu9wRl7z7jdxrd/4abkn1vMsauAbr0ToHvIBteRJw0c9VjjEiGVPXOkUj3jLj\nvjjL\r\n=dMfr\r\n-----END PGP SIGNATURE-----\r\n","size":5670,"noattachment":false,"key":"/hexo-fs/-/hexo-fs-2.0.1.tgz"},"main":"lib/fs.js","engines":{"node":">=8"},"gitHead":"8cdeb6d2ccf27d33d921620068919ee4a0e679c7","scripts":{"test":"mocha test/index.js","eslint":"eslint .","test-cov":"nyc npm run test"},"_npmUser":{"name":"yoshinorin","email":"nayo-msoft@outlook.jp"},"repository":{"url":"git+https://github.com/hexojs/hexo-fs.git","type":"git"},"_npmVersion":"6.14.2","description":"File system module for Hexo.","directories":{"lib":"./lib"},"_nodeVersion":"14.2.0","dependencies":{"bluebird":"^3.5.1","chokidar":"^3.0.0","graceful-fs":"^4.1.11","escape-string-regexp":"^2.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.1.2","iferr":"^1.0.2","mocha":"^6.0.2","eslint":"^6.0.1","chai-as-promised":"^7.1.1","eslint-config-hexo":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hexo-fs_2.0.1_1589382502207_0.846699728751521","host":"s3://npm-registry-packages"},"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":1589382502315,"_cnpm_publish_time":1589382502315,"dist-tags":{"latest":"5.0.1","legacy":"2.0.1"}}