Closed watch-the-stars closed 10 years ago
Documentation says that for reading/writing operations encoding defaults to utf8. But in the following example file contents is still buffer:
utf8
var vowFs = require('vow-fs'); var resolve = require('path').resolve; vowFs.read(resolve(__dirname, 'text.txt')).then(function(content) { console.log(content instanceof Buffer); // true });
Whereas
vowFs.read(resolve(__dirname, 'text.txt'), {encoding: 'utf8'}).then(function(content) { console.log(content instanceof Buffer); // false });
Is it expected behavior? )
Documentation was wrong, sorry (
Documentation says that for reading/writing operations encoding defaults to
utf8
. But in the following example file contents is still buffer:Whereas
Is it expected behavior? )