-
Notifications
You must be signed in to change notification settings - Fork 7.3k
fs createReadStream pipe to createWriteStream #8270
Comments
Check this out: This is my setup: var fs = require('fs')
fs.mkdirSync('src')
fs.mkdirSync('dest')
fs.writeFileSync('./src/1.html','<html></html>')
fs.writeFileSync('./src/1.css','body {background-color:#f00}')
fs.writeFileSync('./src/a.js','"use strict"\n\nvar a = 0;') Then I run this: var fs = require('fs')
fs.createReadStream('./src/1.html').pipe(fs.createWriteStream('./dest/1.html'));
fs.createReadStream('./src/1.css').pipe(fs.createWriteStream('./dest/1.css'));
fs.createReadStream('./src/a.js').pipe(fs.createWriteStream('./dest/a.js')); and all files are copied as expected, and regarding this: jprichardson/node-fs-extra#79 , the same code works the same with fs-extra, (with the code above or with |
...the best thing would be to push a repo with the exact files the code you're running so that we could reproduce it. Also, include node version and the fs/fs-extra versions you're using. |
该文件( |
Google translate:
Sounds like it's a problem with your editor, like it's not watching the file changes. |
ret
ONLY
../dest/1.html
is EMPTYThe text was updated successfully, but these errors were encountered: