| 23 | * The `File` class provides access to files. |
| 24 | */ |
| 25 | export class File { |
| 26 | constructor(path: string, write?: boolean); |
| 27 | /** |
| 28 | * |
| 29 | */ |
| 30 | read<T extends ( |
| 31 | typeof ArrayBuffer | typeof String |
| 32 | )>( |
| 33 | type: T, |
| 34 | bytes?: number |
| 35 | ): T extends typeof String ? string : InstanceType<T>; |
| 36 | |
| 37 | write( |
| 38 | value: ArrayBufferLike | ArrayBuffer | string, |
| 39 | ...moreValues: (ArrayBuffer | string)[] |
| 40 | ): void; |
| 41 | |
| 42 | close(): void; |
| 43 | |
| 44 | readonly length: number; |
| 45 | position: number; |
| 46 | |
| 47 | static delete(path: string): boolean; |
| 48 | static exists(path: string): boolean; |
| 49 | static rename(from: string, to: string): boolean; |
| 50 | } |
| 51 | type IteratorDirectoryEntry = {name: string, length: undefined}; |
| 52 | type IteratorFileEntry = {name: string, length: number}; |
| 53 | class Iterator { |