Top "Fs" questions

File I/O in the Node.

NodeJS fs.open failing on existing file (not a path issue)

I've been dealing with this for a long time, so any help is much appreciated. So, I'm downloading a file …

javascript node.js file-io fs
What are the pros and cons of fs.createReadStream vs fs.readFile in node.js?

I'm mucking about with node.js and have discovered two ways of reading a file and sending it down the …

javascript file node.js fs
Webpack nodejs fs.readFile is not a function

I have a webpack config like: var path = require('path') module.exports = { entry: "./index.js", output: { path: path.join(__dirname, …

node.js webpack fs
Relative file system write path within module

I have a executable node / javascript script that has a debug boolean, if set to true a couple of files …

node.js path relative-path fs
How to delete local file with fs.unlink?

CODE: fs.unlink("/public/images/uploads/"+req.file.filename, (err) => { if (err) { console.log("failed to delete local image:"+…

javascript node.js fs
process.env.PWD vs process.cwd()

I am using Meteor JS...and within my Meteor app I am using node to query the contents of different …

javascript node.js meteor fs
Uncaught TypeError: URL is not a constructor using WHATWG URL object support for electron

I am trying to read a file using WHATWG URL object support here and I am getting this error: Uncaught …

node.js url electron fs
Not works fs.readFile in node js

I have: fs.readFile('../services/Prescipcion.xml', "utf8", function (err, data) { console.log("err->", err); console.log("data", …

node.js file fs
Download file from url and upload it to AWS S3 without saving - node.js

I'm writing an application which downloads images from a url and then uploads it to an S3 bucket using the …

javascript node.js amazon-web-services amazon-s3 fs
fs.statSync throws error if file does not exist

I am attempting to determine if a file exists. If it does not exist, I would like my code to …

node.js fs