| 1 |
# @nodelib/fs.macchiato |
| 2 |
|
| 3 |
> A set of classes for easy testing of built-in structures of FS. |
| 4 |
|
| 5 |
## Install |
| 6 |
|
| 7 |
``` |
| 8 |
$ npm install @nodelib/fs.macchiato |
| 9 |
``` |
| 10 |
|
| 11 |
## Usage |
| 12 |
|
| 13 |
```js |
| 14 |
import { Stats, Dirent } from '@nodelib/fs.macchiato'; |
| 15 |
|
| 16 |
const stats = new Stats(); |
| 17 |
const dirent = new Dirent(); |
| 18 |
``` |
| 19 |
|
| 20 |
## API |
| 21 |
|
| 22 |
### `Stats` |
| 23 |
|
| 24 |
Creates a fake instance of `fs.Stats`. Can accept options to control parameter values. |
| 25 |
|
| 26 |
```js |
| 27 |
const stats = new Stats({ |
| 28 |
isSymbolicLink: true, |
| 29 |
ino: 3 |
| 30 |
}); |
| 31 |
``` |
| 32 |
|
| 33 |
### `Dirent` |
| 34 |
|
| 35 |
Creates a fake instance of `fs.Dirent`. Can accept options to control parameter values. |
| 36 |
|
| 37 |
```js |
| 38 |
const dirent = new Dirent({ |
| 39 |
isSymbolicLink: true |
| 40 |
}); |
| 41 |
``` |
| 42 |
|
| 43 |
## Changelog |
| 44 |
|
| 45 |
See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelogs for each release version. |
| 46 |
|
| 47 |
## License |
| 48 |
|
| 49 |
This software is released under the terms of the MIT license. |