1 | import Promise = require('promise');
|
2 | export interface FileSystemEntry {
|
3 | isFile(): boolean;
|
4 | isDirectory(): boolean;
|
5 | isBlockDevice(): boolean;
|
6 | isCharacterDevice(): boolean;
|
7 | isSymbolicLink(): boolean;
|
8 | isFIFO(): boolean;
|
9 | isSocket(): boolean;
|
10 | dev: number;
|
11 | ino: number;
|
12 | mode: number;
|
13 | nlink: number;
|
14 | uid: number;
|
15 | gid: number;
|
16 | rdev: number;
|
17 | size: number;
|
18 | blksize: number;
|
19 | blocks: number;
|
20 | atime: Date;
|
21 | mtime: Date;
|
22 | ctime: Date;
|
23 | birthtime: Date;
|
24 | |
25 |
|
26 |
|
27 | name: string;
|
28 | |
29 |
|
30 |
|
31 | fullPath: string;
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 | path: string;
|
38 | }
|
39 | export interface Options {
|
40 | filterPath?: (path: string) => boolean;
|
41 | filter?: (entry: FileSystemEntry) => boolean;
|
42 | highWaterMark?: number;
|
43 | ignoreErrors?: boolean;
|
44 | }
|
45 | export declare function lsrSync(dir: string, options?: Options): Array<FileSystemEntry>;
|
46 | export declare type Callback = (err: Error | void | null, result: Array<FileSystemEntry>) => void;
|
47 | export default lsrAsync;
|
48 | export declare function lsrAsync(dir: string, options: Options, callback: Callback): void;
|
49 | export declare function lsrAsync(dir: string, callback: Callback): void;
|
50 | export declare function lsrAsync(dir: string, options?: Options): Promise<Array<FileSystemEntry>>;
|
51 | export declare function lsrStream(dir: string, options: Options): any;
|