From d4d9fab6bbaa2e3591db93461a203c4c4fc98460 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 21:00:04 +0530 Subject: [PATCH] feat: read files --- server/src/workflow-management/storage.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/workflow-management/storage.ts b/server/src/workflow-management/storage.ts index 50d8ca97..40b0bbcd 100644 --- a/server/src/workflow-management/storage.ts +++ b/server/src/workflow-management/storage.ts @@ -81,7 +81,12 @@ function promiseAllP(items: any, block: any) { return Promise.all(promises); } - +/** + * Reads all files from a directory and returns an array of their contents. + * @param dirname The path to the directory. + * @category WorkflowManagement-Storage + * @returns {Promise} + */ export const readFiles = (dirname: string): Promise => { return new Promise((resolve, reject) => { fs.readdir(dirname, function(err, filenames) {