(path: string)
| 135 | } |
| 136 | |
| 137 | public async readdir(path: string): Promise<string[]> { |
| 138 | const response = await this.channel.send('fs/readdir', { path }).catch((error) => { |
| 139 | throw new Error(format('Failed to read directory at path "%s"', path), { cause: error }); |
| 140 | }); |
| 141 | if (!response) { |
| 142 | throw new Error('Directory not found'); |
| 143 | } |
| 144 | return response.data; |
| 145 | } |
| 146 | |
| 147 | public async mkdir(path: string, options?: { recursive?: boolean }): Promise<void> { |
| 148 | const recursive = !!options?.recursive; |