chore: clear file

This commit is contained in:
xiaojunnuo
2023-06-28 15:16:19 +08:00
parent f30afac47e
commit 620d1d4092
7 changed files with 46 additions and 4 deletions

View File

@@ -78,6 +78,12 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
this.ctx = ctx;
}
linkFile(file: FileItem) {
this._result.files!.push({
...file,
id: uuidv4(),
});
}
saveFile(filename: string, file: Buffer) {
const filePath = this.ctx.fileStore.writeFile(filename, file);
this._result.files!.push({