{"name":"@nodelib/fs.scandir","version":"2.1.5","description":"List files and directories inside the specified directory","license":"MIT","repository":{"type":"git","url":"https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir"},"keywords":["NodeLib","fs","FileSystem","file system","scandir","readdir","dirent"],"engines":{"node":">= 8"},"main":"out/index.js","typings":"out/index.d.ts","scripts":{"clean":"rimraf {tsconfig.tsbuildinfo,out}","lint":"eslint \"src/**/*.ts\" --cache","compile":"tsc -b .","compile:watch":"tsc -p . --watch --sourceMap","test":"mocha \"out/**/*.spec.js\" -s 0","build":"npm run clean && npm run compile && npm run lint && npm test","watch":"npm run clean && npm run compile:watch"},"dependencies":{"@nodelib/fs.stat":"2.0.5","run-parallel":"^1.1.9"},"devDependencies":{"@nodelib/fs.macchiato":"1.0.4","@types/run-parallel":"^1.1.0"},"gitHead":"d6a7960d5281d3dd5f8e2efba49bb552d090f562","_id":"@nodelib/fs.scandir@2.1.5","_nodeVersion":"14.14.0","_npmVersion":"lerna/3.22.1/node@v14.14.0+x64 (linux)","dist":{"integrity":"sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==","shasum":"7619c2eb21b25483f6d167548b4cfd5a7488c3d5","tarball":"http://registry-npm.ywwl.com/@nodelib/fs.scandir/download/@nodelib/fs.scandir-2.1.5.tgz","fileCount":23,"unpackedSize":22155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgudmcCRA9TVsSAnZWagAA6MYP/2z1Cd5xsbFs1Kx8HMok\nKyqFteEOgizdfbaGQr6sDFC3mftUObv4STRjf4Bz/SfQ6jkBTzBHrOLNxCEJ\nQCrZRvL8uHPYg5nEthYh2vhv4OJ4ULYv0kP2zaZXEVrqoeJFY5BEWBtPtKip\nDgd9uwdM3vq4fUJuabG26EbD0Y8lDSJs6mctB1NvMgJfCmw7XGyXL1c2VDDM\nVKVxj8iMNFHFt50d6craYqcNR8+JmVD3tfSnGYlf+4cl/24OpJLQgUw4Xzu0\nIbUYi67WAFOqm5VrGZrBoXH1eKmTA0lHk47yTcjq8hruTBw11lGpalD9Z5jV\nQ6ZkalK+CwQIH2uGu6VtJfqC9z2M4agK7OQxy98zhlsQF+jbcH8gnnnAC1lH\nFeUsgvkTj+EIyO8EiuWlpK7/VdF1nd0qN38eZ66kn3TTt7tiwTKeQJyLPWpC\n7XO6WmB61vfeh8fjwztjIkNDXVAD/drQcZAy0BaEvWgwbC0Wqu3gkho7Zv4f\nDuZnu+AIInt/z599UE8vS5AK7i1zMZnwLIr8M0a2JkevbURI6VND8U/Jt4ow\nsJJmCqKFAr0KPyMHYT3/HKxM8BAv+HdCMPjlKCHUo8y5gCkzb+TbnMsFytRB\nsYPAGcA0AUJw4ZpZZhXluMFhF8r3Z1t+sgS+jbvc7reHHMI9+42aBJs+UlXN\nylEe\r\n=2UOB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFmeEkaKAC/2U4SqWznrBPdlRJwyIJpbLQD3LEvNHgXXAiEAqSoKSetRkUCswJPU4ZPrVejCQdUj6dzbxq19Qfsx650="}],"size":6586,"noattachment":false,"key":"/@nodelib/fs.scandir/-/@nodelib/fs.scandir-2.1.5.tgz"},"_npmUser":{"name":"mrmlnc","email":"dmalinochkin@rambler.ru"},"directories":{},"maintainers":[{"name":"mrmlnc","email":"dmalinochkin@rambler.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs.scandir_2.1.5_1622792604311_0.3392038254757559"},"_hasShrinkwrap":false,"readme":"# @nodelib/fs.scandir\n\n> List files and directories inside the specified directory.\n\n## :bulb: Highlights\n\nThe package is aimed at obtaining information about entries in the directory.\n\n* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional).\n* :link: Can safely work with broken symbolic links.\n\n## Install\n\n```console\nnpm install @nodelib/fs.scandir\n```\n\n## Usage\n\n```ts\nimport * as fsScandir from '@nodelib/fs.scandir';\n\nfsScandir.scandir('path', (error, stats) => { /* … */ });\n```\n\n## API\n\n### .scandir(path, [optionsOrSettings], callback)\n\nReturns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style.\n\n```ts\nfsScandir.scandir('path', (error, entries) => { /* … */ });\nfsScandir.scandir('path', {}, (error, entries) => { /* … */ });\nfsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ });\n```\n\n### .scandirSync(path, [optionsOrSettings])\n\nReturns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path.\n\n```ts\nconst entries = fsScandir.scandirSync('path');\nconst entries = fsScandir.scandirSync('path', {});\nconst entries = fsScandir.scandirSync('path', new fsScandir.Settings());\n```\n\n#### path\n\n* Required: `true`\n* Type: `string | Buffer | URL`\n\nA path to a file. If a URL is provided, it must use the `file:` protocol.\n\n#### optionsOrSettings\n\n* Required: `false`\n* Type: `Options | Settings`\n* Default: An instance of `Settings` class\n\nAn [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class.\n\n> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.\n\n### Settings([options])\n\nA class of full settings of the package.\n\n```ts\nconst settings = new fsScandir.Settings({ followSymbolicLinks: false });\n\nconst entries = fsScandir.scandirSync('path', settings);\n```\n\n## Entry\n\n* `name` — The name of the entry (`unknown.txt`).\n* `path` — The path of the entry relative to call directory (`root/unknown.txt`).\n* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. When the `stats` option is enabled, it will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class.\n* `stats` (optional) — An instance of `fs.Stats` class.\n\nFor example, the `scandir` call for `tools` directory with one directory inside:\n\n```ts\n{\n\tdirent: Dirent { name: 'typedoc', /* … */ },\n\tname: 'typedoc',\n\tpath: 'tools/typedoc'\n}\n```\n\n## Options\n\n### stats\n\n* Type: `boolean`\n* Default: `false`\n\nAdds an instance of `fs.Stats` class to the [`Entry`](#entry).\n\n> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO??\n\n### followSymbolicLinks\n\n* Type: `boolean`\n* Default: `false`\n\nFollow symbolic links or not. Call `fs.stat` on symbolic link if `true`.\n\n### `throwErrorOnBrokenSymbolicLink`\n\n* Type: `boolean`\n* Default: `true`\n\nThrow an error when symbolic link is broken if `true` or safely use `lstat` call if `false`.\n\n### `pathSegmentSeparator`\n\n* Type: `string`\n* Default: `path.sep`\n\nBy default, this package uses the correct path separator for your OS (`\\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead.\n\n### `fs`\n\n* Type: [`FileSystemAdapter`](./src/adapters/fs.ts)\n* Default: A default FS methods\n\nBy default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.\n\n```ts\ninterface FileSystemAdapter {\n\tlstat?: typeof fs.lstat;\n\tstat?: typeof fs.stat;\n\tlstatSync?: typeof fs.lstatSync;\n\tstatSync?: typeof fs.statSync;\n\treaddir?: typeof fs.readdir;\n\treaddirSync?: typeof fs.readdirSync;\n}\n\nconst settings = new fsScandir.Settings({\n\tfs: { lstat: fakeLstat }\n});\n```\n\n## Changelog\n\nSee the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.\n\n## License\n\nThis software is released under the terms of the MIT license.\n","publish_time":1622792604492,"_cnpm_publish_time":1622792604492,"dist-tags":{"latest":"4.0.1"}}