(path: string)
| 183 | } |
| 184 | |
| 185 | async delete(path: string): Promise<void> { |
| 186 | const resp = await this.request( |
| 187 | `https://graph.microsoft.com/v1.0/me/drive/special/approot:${joinPath(this.path, path)}`, |
| 188 | { |
| 189 | method: "DELETE", |
| 190 | }, |
| 191 | true |
| 192 | ); |
| 193 | if (resp.status === 404) { |
| 194 | return; |
| 195 | } |
| 196 | if (resp.status !== 204) { |
| 197 | throw new Error(await resp.text()); |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | async list(): Promise<FileInfo[]> { |
| 202 | let { path } = this; |