We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When i am writing a socket program for creating files and writing a file async .Even am using graceful-fs its not working for me .
function writingRefMaster(result) { const arrayOfRefMaster = result.map((jsonFileContent) => { const str = JSON.stringify(jsonFileContent.recordPguid); let _fileName = "test" + str.replace(/[&\/\\#,+()$~%.'":*?<>{}/\D/g]/g, ""); // To generate exact ouput let output_fact = _preProcess.getrefMasterfinalOutput( jsonFileContent, _outputMapperJson ); return fs.promises.writeFile( prop.get("OUTPUT_FILE_PATH") + `${_fileName}.json`, JSON.stringify(output_fact, null, 2) ); }); // I need to wait for async operation to understand when it is finished Promise.all(arrayOfRefMaster) .then(() => { console.log("files created"); }) .catch((err) => { console.log("error creating the files", err); }); }
The text was updated successfully, but these errors were encountered:
graceful-fs does not yet support fs.promises: #160
fs.promises
Sorry, something went wrong.
ok fine got it.Thanks for your reply.
No branches or pull requests
When i am writing a socket program for creating files and writing a file async .Even am using graceful-fs its not working for me .
The text was updated successfully, but these errors were encountered: