(key: string)
| 423 | } |
| 424 | |
| 425 | async stat(key: string): Promise<Entity> { |
| 426 | await this._init(); |
| 427 | const { data, error } = await this.client.GET( |
| 428 | "/api/v2.1/mounts/{mountId}/files/info", |
| 429 | { |
| 430 | params: { |
| 431 | query: { path: getKoofrPath(key, this.remoteBaseDir) }, |
| 432 | path: { mountId: this.placeID }, |
| 433 | }, |
| 434 | } |
| 435 | ); |
| 436 | if (error !== undefined) { |
| 437 | throw Error(JSON.stringify(error)); |
| 438 | } |
| 439 | const entity = fromFileToEntity( |
| 440 | data, |
| 441 | getKoofrPath(getParentFolder(key), this.remoteBaseDir) |
| 442 | ); |
| 443 | // console.debug(entity); |
| 444 | return entity; |
| 445 | } |
| 446 | |
| 447 | async mkdir( |
| 448 | key: string, |
no test coverage detected