MCPcopy Create free account
hub / github.com/firebase/firebase-tools / deleteSubPath

Method deleteSubPath

src/database/remove.ts:112–126  ·  view source on GitHub ↗
(path: string, subPaths: string[])

Source from the content-addressed store, hash-verified

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}

Callers 1

deletePathMethod · 0.95

Calls 3

deletePathMethod · 0.95
runMethod · 0.65
deleteSubPathMethod · 0.65

Tested by

no test coverage detected