From be07e5a40e3446013410deb05e7eb4c75df8ce3f Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 20:56:15 +0530 Subject: [PATCH] docs: read file --- server/src/workflow-management/storage.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/workflow-management/storage.ts b/server/src/workflow-management/storage.ts index cc366b55..a130fdad 100644 --- a/server/src/workflow-management/storage.ts +++ b/server/src/workflow-management/storage.ts @@ -5,6 +5,12 @@ import fs from 'fs'; import * as path from "path"; +/** + * Reads a file from path and returns its content as a string. + * @param path The path to the file. + * @returns {Promise} + * @category WorkflowManagement-Storage + */ export const readFile = (path: string): Promise => { return new Promise((resolve, reject) => { fs.readFile(path, 'utf8', (err, data) => {