From 491e26e8200c811b29350f75fefcce7715fb5144 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 20:58:17 +0530 Subject: [PATCH] docs: save file --- server/src/workflow-management/storage.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/src/workflow-management/storage.ts b/server/src/workflow-management/storage.ts index 1d6ea993..374b6db3 100644 --- a/server/src/workflow-management/storage.ts +++ b/server/src/workflow-management/storage.ts @@ -23,6 +23,13 @@ export const readFile = (path: string): Promise => { }); }; +/** + * Writes a string to a file. If the file already exists, it is overwritten. + * @param path The path to the file. + * @param data The data to write to the file. + * @returns {Promise} + * @category WorkflowManagement-Storage + */ export const saveFile = (path: string, data: string): Promise => { return new Promise((resolve, reject) => { fs.writeFile(path, data, (err) => {