docs: read file

This commit is contained in:
karishmas6
2024-06-08 20:56:15 +05:30
parent 595ddb6689
commit be07e5a40e

View File

@@ -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<string>}
* @category WorkflowManagement-Storage
*/
export const readFile = (path: string): Promise<string> => {
return new Promise((resolve, reject) => {
fs.readFile(path, 'utf8', (err, data) => {