-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfile-system.mts
41 lines (38 loc) · 977 Bytes
/
file-system.mts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* @file Interfaces - FileSystem
* @module tsconfig-utils/interfaces/FileSystem
*/
import type * as mlly from '@flex-development/mlly'
import type { Dirent } from '@flex-development/tsconfig-utils'
/**
* File system API.
*
* @see {@linkcode mlly.FileSystem}
*
* @extends {mlly.FileSystem}
*/
interface FileSystem extends mlly.FileSystem {
/**
* Read the contents of the directory at `id`.
*
* @see {@linkcode Dirent}
* @see {@linkcode mlly.ModuleId}
*
* @this {void}
*
* @param {mlly.ModuleId} id
* Module id of directory to read
* @param {{ withFileTypes: true }} options
* Read options
* @param {true} options.withFileTypes
* Return a list of dirent objects instead of strings or `Buffer`s
* @return {ReadonlyArray<Dirent>}
* Directory content list
*/
readdirSync(
this: void,
id: mlly.ModuleId,
options: { withFileTypes: true }
): readonly Dirent[]
}
export type { FileSystem as default }