(path: string, subPaths: string[])
| 110 | * @return true if the combined size is small (Does not exceed writeSizeLimit of tiny) |
| 111 | */ |
| 112 | private async deleteSubPath(path: string, subPaths: string[]): Promise<boolean> { |
| 113 | if (subPaths.length === 0) { |
| 114 | throw new Error("deleteSubPath is called with empty subPaths list"); |
| 115 | } |
| 116 | if (subPaths.length === 1) { |
| 117 | return this.deletePath(pathLib.join(path, subPaths[0])); |
| 118 | } |
| 119 | if (await this.deleteJobStack.run(() => this.remote.deleteSubPath(path, subPaths))) { |
| 120 | return true; |
| 121 | } |
| 122 | const mid = Math.floor(subPaths.length / 2); |
| 123 | await this.deleteSubPath(path, subPaths.slice(0, mid)); |
| 124 | await this.deleteSubPath(path, subPaths.slice(mid)); |
| 125 | return false; |
| 126 | } |
| 127 | } |
no test coverage detected