Top "Fs" questions

File I/O in the Node.

Cannot find file in Node even though it has correct path

After executing this code: const filename = "../../.dburl" const url = fs.readFileSync(filename, 'utf-8') I recieve the following error: Error: …

node.js fs
How to return a promise when writestream finishes?

I have such a function, which create a write stream and then write the string array into the file. I …

javascript node.js typescript promise fs
How to use Typescript Async/ await with promise in Node JS FS Module

How to use Typescript async / await function and return typescript default promises in node js FS module and call other …

javascript node.js typescript promise fs
How can I lock a file while writing to it asynchronously

I've got two node threads running, one watching a directory for file consumption and another that is responsible for writing …

node.js fs
Saving an image stored on s3 using node.js?

I'm trying to write an image server that uses node.js to store images on s3. Uploading the image works …

node.js amazon-s3 fs
fs.writeFile has no errors, but fails to write file

I am using node.js, trying to save a file, no errors are thrown, yes the image won't save. This …

javascript node.js fs
EACCES: permission denied with Node JS

I get below error when write a file (file name is book) with Node.js, could you please help? Error: …

node.js fs file-access
how to insert a .json document to mongo server by mongojs in node

I'm new with nodeJS and MongoDB. I have this code: var fs = require('fs'); var mongojs = require('mongojs'); var db = …

json node.js fs mongojs
how to use file system (fs) in angular 2

In my angular 2 application, need to use file system for uploading large files to Amazon S3 server. But, I have …

angular filesystems aws-sdk fs fs-extra
Read file with fs.readFileSync and eval contents...which scope have the functions? How to access?

I recently tried to import a file into my existing node.js project. I know this should be written with …

javascript node.js eval fs google-closure-templates