@dineroregnskab/eslint-plugin-custom-rules 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@aashutoshrathi/word-wrap/LICENSE +21 -0
- package/node_modules/@aashutoshrathi/word-wrap/README.md +182 -0
- package/node_modules/@aashutoshrathi/word-wrap/index.d.ts +50 -0
- package/node_modules/@aashutoshrathi/word-wrap/index.js +52 -0
- package/node_modules/@aashutoshrathi/word-wrap/package.json +81 -0
- package/node_modules/@angular-eslint/bundled-angular-compiler/README.md +1 -0
- package/node_modules/@angular-eslint/bundled-angular-compiler/dist/index.d.ts +5 -0
- package/node_modules/@angular-eslint/bundled-angular-compiler/dist/index.js +32004 -0
- package/node_modules/@angular-eslint/bundled-angular-compiler/package.json +19 -0
- package/node_modules/@angular-eslint/template-parser/LICENSE +21 -0
- package/node_modules/@angular-eslint/template-parser/README.md +1 -0
- package/node_modules/@angular-eslint/template-parser/dist/convert-source-span-to-loc.d.ts +6 -0
- package/node_modules/@angular-eslint/template-parser/dist/convert-source-span-to-loc.js +69 -0
- package/node_modules/@angular-eslint/template-parser/dist/index.d.ts +44 -0
- package/node_modules/@angular-eslint/template-parser/dist/index.js +219 -0
- package/node_modules/@angular-eslint/template-parser/package.json +28 -0
- package/node_modules/@eslint/eslintrc/LICENSE +19 -0
- package/node_modules/@eslint/eslintrc/README.md +115 -0
- package/node_modules/@eslint/eslintrc/conf/config-schema.js +79 -0
- package/node_modules/@eslint/eslintrc/conf/environments.js +215 -0
- package/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs +1104 -0
- package/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map +1 -0
- package/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +4333 -0
- package/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map +1 -0
- package/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js +532 -0
- package/node_modules/@eslint/eslintrc/lib/config-array/config-array.js +523 -0
- package/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js +115 -0
- package/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js +145 -0
- package/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js +238 -0
- package/node_modules/@eslint/eslintrc/lib/config-array/index.js +19 -0
- package/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js +225 -0
- package/node_modules/@eslint/eslintrc/lib/config-array-factory.js +1149 -0
- package/node_modules/@eslint/eslintrc/lib/flat-compat.js +318 -0
- package/node_modules/@eslint/eslintrc/lib/index-universal.js +29 -0
- package/node_modules/@eslint/eslintrc/lib/index.js +56 -0
- package/node_modules/@eslint/eslintrc/lib/shared/ajv.js +191 -0
- package/node_modules/@eslint/eslintrc/lib/shared/config-ops.js +135 -0
- package/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +325 -0
- package/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js +63 -0
- package/node_modules/@eslint/eslintrc/lib/shared/naming.js +96 -0
- package/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js +42 -0
- package/node_modules/@eslint/eslintrc/lib/shared/types.js +149 -0
- package/node_modules/@eslint/eslintrc/package.json +82 -0
- package/node_modules/@eslint/eslintrc/universal.js +9 -0
- package/node_modules/@eslint/js/LICENSE +19 -0
- package/node_modules/@eslint/js/README.md +57 -0
- package/node_modules/@eslint/js/package.json +31 -0
- package/node_modules/@eslint/js/src/configs/eslint-all.js +211 -0
- package/node_modules/@eslint/js/src/configs/eslint-recommended.js +76 -0
- package/node_modules/@eslint/js/src/index.js +17 -0
- package/node_modules/@eslint-community/eslint-utils/LICENSE +21 -0
- package/node_modules/@eslint-community/eslint-utils/README.md +37 -0
- package/node_modules/@eslint-community/eslint-utils/index.js +2068 -0
- package/node_modules/@eslint-community/eslint-utils/index.js.map +1 -0
- package/node_modules/@eslint-community/eslint-utils/index.mjs +2027 -0
- package/node_modules/@eslint-community/eslint-utils/index.mjs.map +1 -0
- package/node_modules/@eslint-community/eslint-utils/package.json +73 -0
- package/node_modules/@eslint-community/regexpp/LICENSE +21 -0
- package/node_modules/@eslint-community/regexpp/README.md +177 -0
- package/node_modules/@eslint-community/regexpp/index.d.ts +1065 -0
- package/node_modules/@eslint-community/regexpp/index.js +2747 -0
- package/node_modules/@eslint-community/regexpp/index.js.map +1 -0
- package/node_modules/@eslint-community/regexpp/index.mjs +2737 -0
- package/node_modules/@eslint-community/regexpp/index.mjs.map +1 -0
- package/node_modules/@eslint-community/regexpp/package.json +93 -0
- package/node_modules/@humanwhocodes/config-array/LICENSE +201 -0
- package/node_modules/@humanwhocodes/config-array/README.md +342 -0
- package/node_modules/@humanwhocodes/config-array/api.js +1061 -0
- package/node_modules/@humanwhocodes/config-array/package.json +61 -0
- package/node_modules/@humanwhocodes/module-importer/CHANGELOG.md +15 -0
- package/node_modules/@humanwhocodes/module-importer/LICENSE +201 -0
- package/node_modules/@humanwhocodes/module-importer/README.md +80 -0
- package/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs +22 -0
- package/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts +27 -0
- package/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts +2 -0
- package/node_modules/@humanwhocodes/module-importer/dist/module-importer.js +18 -0
- package/node_modules/@humanwhocodes/module-importer/package.json +65 -0
- package/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs +81 -0
- package/node_modules/@humanwhocodes/module-importer/src/module-importer.js +22 -0
- package/node_modules/@humanwhocodes/object-schema/.eslintrc.js +29 -0
- package/node_modules/@humanwhocodes/object-schema/.github/workflows/nodejs-test.yml +27 -0
- package/node_modules/@humanwhocodes/object-schema/.github/workflows/release-please.yml +39 -0
- package/node_modules/@humanwhocodes/object-schema/CHANGELOG.md +26 -0
- package/node_modules/@humanwhocodes/object-schema/LICENSE +29 -0
- package/node_modules/@humanwhocodes/object-schema/README.md +234 -0
- package/node_modules/@humanwhocodes/object-schema/package.json +33 -0
- package/node_modules/@humanwhocodes/object-schema/src/index.js +7 -0
- package/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js +53 -0
- package/node_modules/@humanwhocodes/object-schema/src/object-schema.js +301 -0
- package/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js +102 -0
- package/node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js +66 -0
- package/node_modules/@humanwhocodes/object-schema/tests/object-schema.js +659 -0
- package/node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js +186 -0
- package/node_modules/@nodelib/fs.scandir/LICENSE +21 -0
- package/node_modules/@nodelib/fs.scandir/README.md +171 -0
- package/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
- package/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
- package/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
- package/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
- package/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
- package/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
- package/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
- package/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
- package/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
- package/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
- package/node_modules/@nodelib/fs.scandir/package.json +44 -0
- package/node_modules/@nodelib/fs.stat/LICENSE +21 -0
- package/node_modules/@nodelib/fs.stat/README.md +126 -0
- package/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
- package/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/node_modules/@nodelib/fs.stat/out/index.js +26 -0
- package/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
- package/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
- package/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
- package/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
- package/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
- package/node_modules/@nodelib/fs.stat/package.json +37 -0
- package/node_modules/@nodelib/fs.walk/LICENSE +21 -0
- package/node_modules/@nodelib/fs.walk/README.md +215 -0
- package/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/node_modules/@nodelib/fs.walk/out/index.js +34 -0
- package/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
- package/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
- package/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
- package/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
- package/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
- package/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
- package/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
- package/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
- package/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
- package/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
- package/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
- package/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
- package/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
- package/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
- package/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
- package/node_modules/@nodelib/fs.walk/package.json +44 -0
- package/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml +31 -0
- package/node_modules/@ungap/structured-clone/LICENSE +15 -0
- package/node_modules/@ungap/structured-clone/README.md +95 -0
- package/node_modules/@ungap/structured-clone/cjs/deserialize.js +78 -0
- package/node_modules/@ungap/structured-clone/cjs/index.js +27 -0
- package/node_modules/@ungap/structured-clone/cjs/json.js +24 -0
- package/node_modules/@ungap/structured-clone/cjs/package.json +1 -0
- package/node_modules/@ungap/structured-clone/cjs/serialize.js +160 -0
- package/node_modules/@ungap/structured-clone/cjs/types.js +22 -0
- package/node_modules/@ungap/structured-clone/esm/deserialize.js +79 -0
- package/node_modules/@ungap/structured-clone/esm/index.js +25 -0
- package/node_modules/@ungap/structured-clone/esm/json.js +21 -0
- package/node_modules/@ungap/structured-clone/esm/serialize.js +161 -0
- package/node_modules/@ungap/structured-clone/esm/types.js +11 -0
- package/node_modules/@ungap/structured-clone/package.json +53 -0
- package/node_modules/@ungap/structured-clone/structured-json.js +1 -0
- package/package.json +1 -1
- package/rules/dayjs-with-timezone.js +29 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# @nodelib/fs.walk
|
|
2
|
+
|
|
3
|
+
> A library for efficiently walking a directory recursively.
|
|
4
|
+
|
|
5
|
+
## :bulb: Highlights
|
|
6
|
+
|
|
7
|
+
* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional).
|
|
8
|
+
* :rocket: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type for performance reasons. See [`old` and `modern` mode](https://github.com/nodelib/nodelib/blob/master/packages/fs/fs.scandir/README.md#old-and-modern-mode).
|
|
9
|
+
* :gear: Built-in directories/files and error filtering system.
|
|
10
|
+
* :link: Can safely work with broken symbolic links.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```console
|
|
15
|
+
npm install @nodelib/fs.walk
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import * as fsWalk from '@nodelib/fs.walk';
|
|
22
|
+
|
|
23
|
+
fsWalk.walk('path', (error, entries) => { /* … */ });
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## API
|
|
27
|
+
|
|
28
|
+
### .walk(path, [optionsOrSettings], callback)
|
|
29
|
+
|
|
30
|
+
Reads the directory recursively and asynchronously. Requires a callback function.
|
|
31
|
+
|
|
32
|
+
> :book: If you want to use the Promise API, use `util.promisify`.
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
fsWalk.walk('path', (error, entries) => { /* … */ });
|
|
36
|
+
fsWalk.walk('path', {}, (error, entries) => { /* … */ });
|
|
37
|
+
fsWalk.walk('path', new fsWalk.Settings(), (error, entries) => { /* … */ });
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### .walkStream(path, [optionsOrSettings])
|
|
41
|
+
|
|
42
|
+
Reads the directory recursively and asynchronously. [Readable Stream](https://nodejs.org/dist/latest-v12.x/docs/api/stream.html#stream_readable_streams) is used as a provider.
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
const stream = fsWalk.walkStream('path');
|
|
46
|
+
const stream = fsWalk.walkStream('path', {});
|
|
47
|
+
const stream = fsWalk.walkStream('path', new fsWalk.Settings());
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### .walkSync(path, [optionsOrSettings])
|
|
51
|
+
|
|
52
|
+
Reads the directory recursively and synchronously. Returns an array of entries.
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
const entries = fsWalk.walkSync('path');
|
|
56
|
+
const entries = fsWalk.walkSync('path', {});
|
|
57
|
+
const entries = fsWalk.walkSync('path', new fsWalk.Settings());
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### path
|
|
61
|
+
|
|
62
|
+
* Required: `true`
|
|
63
|
+
* Type: `string | Buffer | URL`
|
|
64
|
+
|
|
65
|
+
A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
66
|
+
|
|
67
|
+
#### optionsOrSettings
|
|
68
|
+
|
|
69
|
+
* Required: `false`
|
|
70
|
+
* Type: `Options | Settings`
|
|
71
|
+
* Default: An instance of `Settings` class
|
|
72
|
+
|
|
73
|
+
An [`Options`](#options) object or an instance of [`Settings`](#settings) class.
|
|
74
|
+
|
|
75
|
+
> :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.
|
|
76
|
+
|
|
77
|
+
### Settings([options])
|
|
78
|
+
|
|
79
|
+
A class of full settings of the package.
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
const settings = new fsWalk.Settings({ followSymbolicLinks: true });
|
|
83
|
+
|
|
84
|
+
const entries = fsWalk.walkSync('path', settings);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Entry
|
|
88
|
+
|
|
89
|
+
* `name` — The name of the entry (`unknown.txt`).
|
|
90
|
+
* `path` — The path of the entry relative to call directory (`root/unknown.txt`).
|
|
91
|
+
* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class.
|
|
92
|
+
* [`stats`] — An instance of `fs.Stats` class.
|
|
93
|
+
|
|
94
|
+
## Options
|
|
95
|
+
|
|
96
|
+
### basePath
|
|
97
|
+
|
|
98
|
+
* Type: `string`
|
|
99
|
+
* Default: `undefined`
|
|
100
|
+
|
|
101
|
+
By default, all paths are built relative to the root path. You can use this option to set custom root path.
|
|
102
|
+
|
|
103
|
+
In the example below we read the files from the `root` directory, but in the results the root path will be `custom`.
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
fsWalk.walkSync('root'); // → ['root/file.txt']
|
|
107
|
+
fsWalk.walkSync('root', { basePath: 'custom' }); // → ['custom/file.txt']
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### concurrency
|
|
111
|
+
|
|
112
|
+
* Type: `number`
|
|
113
|
+
* Default: `Infinity`
|
|
114
|
+
|
|
115
|
+
The maximum number of concurrent calls to `fs.readdir`.
|
|
116
|
+
|
|
117
|
+
> :book: The higher the number, the higher performance and the load on the File System. If you want to read in quiet mode, set the value to `4 * os.cpus().length` (4 is default size of [thread pool work scheduling](http://docs.libuv.org/en/v1.x/threadpool.html#thread-pool-work-scheduling)).
|
|
118
|
+
|
|
119
|
+
### deepFilter
|
|
120
|
+
|
|
121
|
+
* Type: [`DeepFilterFunction`](./src/settings.ts)
|
|
122
|
+
* Default: `undefined`
|
|
123
|
+
|
|
124
|
+
A function that indicates whether the directory will be read deep or not.
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
// Skip all directories that starts with `node_modules`
|
|
128
|
+
const filter: DeepFilterFunction = (entry) => !entry.path.startsWith('node_modules');
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### entryFilter
|
|
132
|
+
|
|
133
|
+
* Type: [`EntryFilterFunction`](./src/settings.ts)
|
|
134
|
+
* Default: `undefined`
|
|
135
|
+
|
|
136
|
+
A function that indicates whether the entry will be included to results or not.
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
// Exclude all `.js` files from results
|
|
140
|
+
const filter: EntryFilterFunction = (entry) => !entry.name.endsWith('.js');
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### errorFilter
|
|
144
|
+
|
|
145
|
+
* Type: [`ErrorFilterFunction`](./src/settings.ts)
|
|
146
|
+
* Default: `undefined`
|
|
147
|
+
|
|
148
|
+
A function that allows you to skip errors that occur when reading directories.
|
|
149
|
+
|
|
150
|
+
For example, you can skip `ENOENT` errors if required:
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
// Skip all ENOENT errors
|
|
154
|
+
const filter: ErrorFilterFunction = (error) => error.code == 'ENOENT';
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### stats
|
|
158
|
+
|
|
159
|
+
* Type: `boolean`
|
|
160
|
+
* Default: `false`
|
|
161
|
+
|
|
162
|
+
Adds an instance of `fs.Stats` class to the [`Entry`](#entry).
|
|
163
|
+
|
|
164
|
+
> :book: Always use `fs.readdir` with additional `fs.lstat/fs.stat` calls to determine the entry type.
|
|
165
|
+
|
|
166
|
+
### followSymbolicLinks
|
|
167
|
+
|
|
168
|
+
* Type: `boolean`
|
|
169
|
+
* Default: `false`
|
|
170
|
+
|
|
171
|
+
Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`.
|
|
172
|
+
|
|
173
|
+
### `throwErrorOnBrokenSymbolicLink`
|
|
174
|
+
|
|
175
|
+
* Type: `boolean`
|
|
176
|
+
* Default: `true`
|
|
177
|
+
|
|
178
|
+
Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`.
|
|
179
|
+
|
|
180
|
+
### `pathSegmentSeparator`
|
|
181
|
+
|
|
182
|
+
* Type: `string`
|
|
183
|
+
* Default: `path.sep`
|
|
184
|
+
|
|
185
|
+
By 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.
|
|
186
|
+
|
|
187
|
+
### `fs`
|
|
188
|
+
|
|
189
|
+
* Type: `FileSystemAdapter`
|
|
190
|
+
* Default: A default FS methods
|
|
191
|
+
|
|
192
|
+
By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
|
|
193
|
+
|
|
194
|
+
```ts
|
|
195
|
+
interface FileSystemAdapter {
|
|
196
|
+
lstat: typeof fs.lstat;
|
|
197
|
+
stat: typeof fs.stat;
|
|
198
|
+
lstatSync: typeof fs.lstatSync;
|
|
199
|
+
statSync: typeof fs.statSync;
|
|
200
|
+
readdir: typeof fs.readdir;
|
|
201
|
+
readdirSync: typeof fs.readdirSync;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const settings = new fsWalk.Settings({
|
|
205
|
+
fs: { lstat: fakeLstat }
|
|
206
|
+
});
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Changelog
|
|
210
|
+
|
|
211
|
+
See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
|
|
212
|
+
|
|
213
|
+
## License
|
|
214
|
+
|
|
215
|
+
This software is released under the terms of the MIT license.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Readable } from 'stream';
|
|
3
|
+
import type { Dirent, FileSystemAdapter } from '@nodelib/fs.scandir';
|
|
4
|
+
import { AsyncCallback } from './providers/async';
|
|
5
|
+
import Settings, { DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction, Options } from './settings';
|
|
6
|
+
import type { Entry } from './types';
|
|
7
|
+
declare function walk(directory: string, callback: AsyncCallback): void;
|
|
8
|
+
declare function walk(directory: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void;
|
|
9
|
+
declare namespace walk {
|
|
10
|
+
function __promisify__(directory: string, optionsOrSettings?: Options | Settings): Promise<Entry[]>;
|
|
11
|
+
}
|
|
12
|
+
declare function walkSync(directory: string, optionsOrSettings?: Options | Settings): Entry[];
|
|
13
|
+
declare function walkStream(directory: string, optionsOrSettings?: Options | Settings): Readable;
|
|
14
|
+
export { walk, walkSync, walkStream, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, Options, DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0;
|
|
4
|
+
const async_1 = require("./providers/async");
|
|
5
|
+
const stream_1 = require("./providers/stream");
|
|
6
|
+
const sync_1 = require("./providers/sync");
|
|
7
|
+
const settings_1 = require("./settings");
|
|
8
|
+
exports.Settings = settings_1.default;
|
|
9
|
+
function walk(directory, optionsOrSettingsOrCallback, callback) {
|
|
10
|
+
if (typeof optionsOrSettingsOrCallback === 'function') {
|
|
11
|
+
new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
|
|
15
|
+
}
|
|
16
|
+
exports.walk = walk;
|
|
17
|
+
function walkSync(directory, optionsOrSettings) {
|
|
18
|
+
const settings = getSettings(optionsOrSettings);
|
|
19
|
+
const provider = new sync_1.default(directory, settings);
|
|
20
|
+
return provider.read();
|
|
21
|
+
}
|
|
22
|
+
exports.walkSync = walkSync;
|
|
23
|
+
function walkStream(directory, optionsOrSettings) {
|
|
24
|
+
const settings = getSettings(optionsOrSettings);
|
|
25
|
+
const provider = new stream_1.default(directory, settings);
|
|
26
|
+
return provider.read();
|
|
27
|
+
}
|
|
28
|
+
exports.walkStream = walkStream;
|
|
29
|
+
function getSettings(settingsOrOptions = {}) {
|
|
30
|
+
if (settingsOrOptions instanceof settings_1.default) {
|
|
31
|
+
return settingsOrOptions;
|
|
32
|
+
}
|
|
33
|
+
return new settings_1.default(settingsOrOptions);
|
|
34
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import AsyncReader from '../readers/async';
|
|
2
|
+
import type Settings from '../settings';
|
|
3
|
+
import type { Entry, Errno } from '../types';
|
|
4
|
+
export declare type AsyncCallback = (error: Errno, entries: Entry[]) => void;
|
|
5
|
+
export default class AsyncProvider {
|
|
6
|
+
private readonly _root;
|
|
7
|
+
private readonly _settings;
|
|
8
|
+
protected readonly _reader: AsyncReader;
|
|
9
|
+
private readonly _storage;
|
|
10
|
+
constructor(_root: string, _settings: Settings);
|
|
11
|
+
read(callback: AsyncCallback): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const async_1 = require("../readers/async");
|
|
4
|
+
class AsyncProvider {
|
|
5
|
+
constructor(_root, _settings) {
|
|
6
|
+
this._root = _root;
|
|
7
|
+
this._settings = _settings;
|
|
8
|
+
this._reader = new async_1.default(this._root, this._settings);
|
|
9
|
+
this._storage = [];
|
|
10
|
+
}
|
|
11
|
+
read(callback) {
|
|
12
|
+
this._reader.onError((error) => {
|
|
13
|
+
callFailureCallback(callback, error);
|
|
14
|
+
});
|
|
15
|
+
this._reader.onEntry((entry) => {
|
|
16
|
+
this._storage.push(entry);
|
|
17
|
+
});
|
|
18
|
+
this._reader.onEnd(() => {
|
|
19
|
+
callSuccessCallback(callback, this._storage);
|
|
20
|
+
});
|
|
21
|
+
this._reader.read();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = AsyncProvider;
|
|
25
|
+
function callFailureCallback(callback, error) {
|
|
26
|
+
callback(error);
|
|
27
|
+
}
|
|
28
|
+
function callSuccessCallback(callback, entries) {
|
|
29
|
+
callback(null, entries);
|
|
30
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyncProvider = exports.StreamProvider = exports.AsyncProvider = void 0;
|
|
4
|
+
const async_1 = require("./async");
|
|
5
|
+
exports.AsyncProvider = async_1.default;
|
|
6
|
+
const stream_1 = require("./stream");
|
|
7
|
+
exports.StreamProvider = stream_1.default;
|
|
8
|
+
const sync_1 = require("./sync");
|
|
9
|
+
exports.SyncProvider = sync_1.default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Readable } from 'stream';
|
|
3
|
+
import AsyncReader from '../readers/async';
|
|
4
|
+
import type Settings from '../settings';
|
|
5
|
+
export default class StreamProvider {
|
|
6
|
+
private readonly _root;
|
|
7
|
+
private readonly _settings;
|
|
8
|
+
protected readonly _reader: AsyncReader;
|
|
9
|
+
protected readonly _stream: Readable;
|
|
10
|
+
constructor(_root: string, _settings: Settings);
|
|
11
|
+
read(): Readable;
|
|
12
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const stream_1 = require("stream");
|
|
4
|
+
const async_1 = require("../readers/async");
|
|
5
|
+
class StreamProvider {
|
|
6
|
+
constructor(_root, _settings) {
|
|
7
|
+
this._root = _root;
|
|
8
|
+
this._settings = _settings;
|
|
9
|
+
this._reader = new async_1.default(this._root, this._settings);
|
|
10
|
+
this._stream = new stream_1.Readable({
|
|
11
|
+
objectMode: true,
|
|
12
|
+
read: () => { },
|
|
13
|
+
destroy: () => {
|
|
14
|
+
if (!this._reader.isDestroyed) {
|
|
15
|
+
this._reader.destroy();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
read() {
|
|
21
|
+
this._reader.onError((error) => {
|
|
22
|
+
this._stream.emit('error', error);
|
|
23
|
+
});
|
|
24
|
+
this._reader.onEntry((entry) => {
|
|
25
|
+
this._stream.push(entry);
|
|
26
|
+
});
|
|
27
|
+
this._reader.onEnd(() => {
|
|
28
|
+
this._stream.push(null);
|
|
29
|
+
});
|
|
30
|
+
this._reader.read();
|
|
31
|
+
return this._stream;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = StreamProvider;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import SyncReader from '../readers/sync';
|
|
2
|
+
import type Settings from '../settings';
|
|
3
|
+
import type { Entry } from '../types';
|
|
4
|
+
export default class SyncProvider {
|
|
5
|
+
private readonly _root;
|
|
6
|
+
private readonly _settings;
|
|
7
|
+
protected readonly _reader: SyncReader;
|
|
8
|
+
constructor(_root: string, _settings: Settings);
|
|
9
|
+
read(): Entry[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sync_1 = require("../readers/sync");
|
|
4
|
+
class SyncProvider {
|
|
5
|
+
constructor(_root, _settings) {
|
|
6
|
+
this._root = _root;
|
|
7
|
+
this._settings = _settings;
|
|
8
|
+
this._reader = new sync_1.default(this._root, this._settings);
|
|
9
|
+
}
|
|
10
|
+
read() {
|
|
11
|
+
return this._reader.read();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.default = SyncProvider;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
import * as fsScandir from '@nodelib/fs.scandir';
|
|
4
|
+
import type Settings from '../settings';
|
|
5
|
+
import type { Entry, Errno } from '../types';
|
|
6
|
+
import Reader from './reader';
|
|
7
|
+
declare type EntryEventCallback = (entry: Entry) => void;
|
|
8
|
+
declare type ErrorEventCallback = (error: Errno) => void;
|
|
9
|
+
declare type EndEventCallback = () => void;
|
|
10
|
+
export default class AsyncReader extends Reader {
|
|
11
|
+
protected readonly _settings: Settings;
|
|
12
|
+
protected readonly _scandir: typeof fsScandir.scandir;
|
|
13
|
+
protected readonly _emitter: EventEmitter;
|
|
14
|
+
private readonly _queue;
|
|
15
|
+
private _isFatalError;
|
|
16
|
+
private _isDestroyed;
|
|
17
|
+
constructor(_root: string, _settings: Settings);
|
|
18
|
+
read(): EventEmitter;
|
|
19
|
+
get isDestroyed(): boolean;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
onEntry(callback: EntryEventCallback): void;
|
|
22
|
+
onError(callback: ErrorEventCallback): void;
|
|
23
|
+
onEnd(callback: EndEventCallback): void;
|
|
24
|
+
private _pushToQueue;
|
|
25
|
+
private _worker;
|
|
26
|
+
private _handleError;
|
|
27
|
+
private _handleEntry;
|
|
28
|
+
private _emitEntry;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const events_1 = require("events");
|
|
4
|
+
const fsScandir = require("@nodelib/fs.scandir");
|
|
5
|
+
const fastq = require("fastq");
|
|
6
|
+
const common = require("./common");
|
|
7
|
+
const reader_1 = require("./reader");
|
|
8
|
+
class AsyncReader extends reader_1.default {
|
|
9
|
+
constructor(_root, _settings) {
|
|
10
|
+
super(_root, _settings);
|
|
11
|
+
this._settings = _settings;
|
|
12
|
+
this._scandir = fsScandir.scandir;
|
|
13
|
+
this._emitter = new events_1.EventEmitter();
|
|
14
|
+
this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
|
|
15
|
+
this._isFatalError = false;
|
|
16
|
+
this._isDestroyed = false;
|
|
17
|
+
this._queue.drain = () => {
|
|
18
|
+
if (!this._isFatalError) {
|
|
19
|
+
this._emitter.emit('end');
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
read() {
|
|
24
|
+
this._isFatalError = false;
|
|
25
|
+
this._isDestroyed = false;
|
|
26
|
+
setImmediate(() => {
|
|
27
|
+
this._pushToQueue(this._root, this._settings.basePath);
|
|
28
|
+
});
|
|
29
|
+
return this._emitter;
|
|
30
|
+
}
|
|
31
|
+
get isDestroyed() {
|
|
32
|
+
return this._isDestroyed;
|
|
33
|
+
}
|
|
34
|
+
destroy() {
|
|
35
|
+
if (this._isDestroyed) {
|
|
36
|
+
throw new Error('The reader is already destroyed');
|
|
37
|
+
}
|
|
38
|
+
this._isDestroyed = true;
|
|
39
|
+
this._queue.killAndDrain();
|
|
40
|
+
}
|
|
41
|
+
onEntry(callback) {
|
|
42
|
+
this._emitter.on('entry', callback);
|
|
43
|
+
}
|
|
44
|
+
onError(callback) {
|
|
45
|
+
this._emitter.once('error', callback);
|
|
46
|
+
}
|
|
47
|
+
onEnd(callback) {
|
|
48
|
+
this._emitter.once('end', callback);
|
|
49
|
+
}
|
|
50
|
+
_pushToQueue(directory, base) {
|
|
51
|
+
const queueItem = { directory, base };
|
|
52
|
+
this._queue.push(queueItem, (error) => {
|
|
53
|
+
if (error !== null) {
|
|
54
|
+
this._handleError(error);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
_worker(item, done) {
|
|
59
|
+
this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
|
|
60
|
+
if (error !== null) {
|
|
61
|
+
done(error, undefined);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
for (const entry of entries) {
|
|
65
|
+
this._handleEntry(entry, item.base);
|
|
66
|
+
}
|
|
67
|
+
done(null, undefined);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
_handleError(error) {
|
|
71
|
+
if (this._isDestroyed || !common.isFatalError(this._settings, error)) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this._isFatalError = true;
|
|
75
|
+
this._isDestroyed = true;
|
|
76
|
+
this._emitter.emit('error', error);
|
|
77
|
+
}
|
|
78
|
+
_handleEntry(entry, base) {
|
|
79
|
+
if (this._isDestroyed || this._isFatalError) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const fullpath = entry.path;
|
|
83
|
+
if (base !== undefined) {
|
|
84
|
+
entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
|
|
85
|
+
}
|
|
86
|
+
if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
|
|
87
|
+
this._emitEntry(entry);
|
|
88
|
+
}
|
|
89
|
+
if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
|
|
90
|
+
this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
_emitEntry(entry) {
|
|
94
|
+
this._emitter.emit('entry', entry);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.default = AsyncReader;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FilterFunction } from '../settings';
|
|
2
|
+
import type Settings from '../settings';
|
|
3
|
+
import type { Errno } from '../types';
|
|
4
|
+
export declare function isFatalError(settings: Settings, error: Errno): boolean;
|
|
5
|
+
export declare function isAppliedFilter<T>(filter: FilterFunction<T> | null, value: T): boolean;
|
|
6
|
+
export declare function replacePathSegmentSeparator(filepath: string, separator: string): string;
|
|
7
|
+
export declare function joinPathSegments(a: string, b: string, separator: string): string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
|
|
4
|
+
function isFatalError(settings, error) {
|
|
5
|
+
if (settings.errorFilter === null) {
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
return !settings.errorFilter(error);
|
|
9
|
+
}
|
|
10
|
+
exports.isFatalError = isFatalError;
|
|
11
|
+
function isAppliedFilter(filter, value) {
|
|
12
|
+
return filter === null || filter(value);
|
|
13
|
+
}
|
|
14
|
+
exports.isAppliedFilter = isAppliedFilter;
|
|
15
|
+
function replacePathSegmentSeparator(filepath, separator) {
|
|
16
|
+
return filepath.split(/[/\\]/).join(separator);
|
|
17
|
+
}
|
|
18
|
+
exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
|
|
19
|
+
function joinPathSegments(a, b, separator) {
|
|
20
|
+
if (a === '') {
|
|
21
|
+
return b;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
|
|
25
|
+
*/
|
|
26
|
+
if (a.endsWith(separator)) {
|
|
27
|
+
return a + b;
|
|
28
|
+
}
|
|
29
|
+
return a + separator + b;
|
|
30
|
+
}
|
|
31
|
+
exports.joinPathSegments = joinPathSegments;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const common = require("./common");
|
|
4
|
+
class Reader {
|
|
5
|
+
constructor(_root, _settings) {
|
|
6
|
+
this._root = _root;
|
|
7
|
+
this._settings = _settings;
|
|
8
|
+
this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.default = Reader;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as fsScandir from '@nodelib/fs.scandir';
|
|
2
|
+
import type { Entry } from '../types';
|
|
3
|
+
import Reader from './reader';
|
|
4
|
+
export default class SyncReader extends Reader {
|
|
5
|
+
protected readonly _scandir: typeof fsScandir.scandirSync;
|
|
6
|
+
private readonly _storage;
|
|
7
|
+
private readonly _queue;
|
|
8
|
+
read(): Entry[];
|
|
9
|
+
private _pushToQueue;
|
|
10
|
+
private _handleQueue;
|
|
11
|
+
private _handleDirectory;
|
|
12
|
+
private _handleError;
|
|
13
|
+
private _handleEntry;
|
|
14
|
+
private _pushToStorage;
|
|
15
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fsScandir = require("@nodelib/fs.scandir");
|
|
4
|
+
const common = require("./common");
|
|
5
|
+
const reader_1 = require("./reader");
|
|
6
|
+
class SyncReader extends reader_1.default {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this._scandir = fsScandir.scandirSync;
|
|
10
|
+
this._storage = [];
|
|
11
|
+
this._queue = new Set();
|
|
12
|
+
}
|
|
13
|
+
read() {
|
|
14
|
+
this._pushToQueue(this._root, this._settings.basePath);
|
|
15
|
+
this._handleQueue();
|
|
16
|
+
return this._storage;
|
|
17
|
+
}
|
|
18
|
+
_pushToQueue(directory, base) {
|
|
19
|
+
this._queue.add({ directory, base });
|
|
20
|
+
}
|
|
21
|
+
_handleQueue() {
|
|
22
|
+
for (const item of this._queue.values()) {
|
|
23
|
+
this._handleDirectory(item.directory, item.base);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
_handleDirectory(directory, base) {
|
|
27
|
+
try {
|
|
28
|
+
const entries = this._scandir(directory, this._settings.fsScandirSettings);
|
|
29
|
+
for (const entry of entries) {
|
|
30
|
+
this._handleEntry(entry, base);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
this._handleError(error);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
_handleError(error) {
|
|
38
|
+
if (!common.isFatalError(this._settings, error)) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
throw error;
|
|
42
|
+
}
|
|
43
|
+
_handleEntry(entry, base) {
|
|
44
|
+
const fullpath = entry.path;
|
|
45
|
+
if (base !== undefined) {
|
|
46
|
+
entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
|
|
47
|
+
}
|
|
48
|
+
if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
|
|
49
|
+
this._pushToStorage(entry);
|
|
50
|
+
}
|
|
51
|
+
if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
|
|
52
|
+
this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
_pushToStorage(entry) {
|
|
56
|
+
this._storage.push(entry);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.default = SyncReader;
|