final
This commit is contained in:
14
task10/app.js
Normal file
14
task10/app.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const fs = require('fs');
|
||||
|
||||
let writeableStream = fs.createWriteStream('hello.txt');
|
||||
writeableStream.write('Привет мир! \n');
|
||||
writeableStream.write('Продолжение записи \n');
|
||||
writeableStream.end('Завершение записи');
|
||||
let readableStream = fs.createReadStream(
|
||||
'hello.txt',
|
||||
'utf8'
|
||||
);
|
||||
|
||||
readableStream.on('data', function (chunk) {
|
||||
console.log(chunk);
|
||||
});
|
||||
Reference in New Issue
Block a user