]> git.kaiwu.me - njs.git/commit
Adding support for Buffer objects in "fs" methods.
authorDmitry Volyntsev <xeioex@nginx.com>
Mon, 28 Sep 2020 17:45:44 +0000 (17:45 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Mon, 28 Sep 2020 17:45:44 +0000 (17:45 +0000)
commit7fd2166d01883aca9e2a9df9f65f552ba4196ecc
tree4d42f24fbbca5e16ff4372f7b771f39257f66258
parent5f7dc4fd733f1b1d4258378b3ca1641585cd358d
Adding support for Buffer objects in "fs" methods.

fs.writeFile(), fs.appendFile() and friends may accept an instance of
Buffer as an argument.

Also, fs.readFile() and friends now return an instance of Buffer instead of
Byte-string when encoding is not provided.

Added Buffer encoding for fs.readdir(), fs.realpath() and friends.
src/njs_fs.c
src/test/njs_unit_test.c
test/js/fs_appendFile.js [new file with mode: 0644]
test/js/fs_appendFileSync.js [new file with mode: 0644]
test/js/fs_promises_001.js
test/js/fs_promises_007.js
test/js/fs_readFile.js [new file with mode: 0644]
test/js/fs_readFileSync.js [new file with mode: 0644]
test/js/fs_writeFile.js [new file with mode: 0644]
test/js/fs_writeFileSync.js [new file with mode: 0644]
test/njs_expect_test.exp