fs-read-exactly
2019-02-13
admin
fs-read-exactly是什么
什么是fs-read-exactly,Read exactly n bytes of an fd or file
fs-read-exactly使用教程帮助文档
fs-read-exactly
Read exactly n bytes of an fd or file
example
const readExactly = require('fs-read-exactly')
readExactly('readme.md', 0, 15, function (err, chunk) {
console.log(err) // null
console.log(chunk.toString()) // '# fs-read-exact'
})
readExactly('readme.md', 0, 1e4, function (err, chunk) {
console.log(err.code) // 'EOF'
})
readExactly(mixed, pos, length, callback)
Where mixed
is either a filename or a file descriptor.
install
With npm do:
npm install fs-read-exactly
license
MIT © Vincent Weevers
本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。
转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]
本文地址:https://www.javascriptcn.com/read-53664.html
文章标题:fs-read-exactly