MCPcopy Create free account
hub / github.com/decaporg/decap-cms / deleteFiles

Method deleteFiles

packages/decap-cms-backend-gitea/src/API.ts:450–463  ·  view source on GitHub ↗
(paths: string[], message: string)

Source from the content-addressed store, hash-verified

448 }
449
450 async deleteFiles(paths: string[], message: string) {
451 const operations: ChangeFileOperation[] = await Promise.all(
452 paths.map(async path => {
453 const sha = await this.getFileSha(path);
454
455 return {
456 operation: FileOperation.DELETE,
457 path,
458 sha,
459 } as ChangeFileOperation;
460 }),
461 );
462 this.changeFiles(operations, { commitMessage: message });
463 }
464
465 toBase64(str: string) {
466 return Promise.resolve(Base64.encode(str));

Callers 1

API.spec.jsFile · 0.45

Calls 3

getFileShaMethod · 0.95
changeFilesMethod · 0.95
mapMethod · 0.80

Tested by

no test coverage detected