random-access-file:使用随机偏移量和长度连续读取或写入文件

时间:2021-05-06 12:11:23
【文件属性】:
文件名称:random-access-file:使用随机偏移量和长度连续读取或写入文件
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-06 12:11:23
JavaScript 随机访问文件 使用随机偏移量和长度连续读取或写入文件 npm install random-access-file 为什么? 如果要在分布式系统中接收多个文件,则将这些文件逐个写入磁盘的各个位置会很有用,而不必始终打开和关闭文件描述符。 random-access-file允许您执行此操作。 用法 var randomAccessFile = require ( 'random-access-file' ) var file = randomAccessFile ( 'my-file.txt' ) file . write ( 10 , Buffer . from ( 'hello' ) , function ( err ) { // write a buffer to offset 10 file . read ( 10 , 5 , function ( err , buff
【文件预览】:
random-access-file-master
----browser.js(105B)
----index.js(5KB)
----test.js(8KB)
----package.json(785B)
----.github()
--------workflows()
----example.js(401B)
----.gitignore(13B)
----README.md(2KB)

网友评论