bare-fs 4.5.2 → 4.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.c +2 -0
- package/index.js +4 -2
- package/package.json +1 -1
- package/prebuilds/android-arm/bare-fs.bare +0 -0
- package/prebuilds/android-arm64/bare-fs.bare +0 -0
- package/prebuilds/android-ia32/bare-fs.bare +0 -0
- package/prebuilds/android-x64/bare-fs.bare +0 -0
- package/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/prebuilds/darwin-x64/bare-fs.bare +0 -0
- package/prebuilds/ios-arm64/bare-fs.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
- package/prebuilds/linux-arm64/bare-fs.bare +0 -0
- package/prebuilds/linux-x64/bare-fs.bare +0 -0
- package/prebuilds/win32-arm64/bare-fs.bare +0 -0
- package/prebuilds/win32-x64/bare-fs.bare +0 -0
package/binding.c
CHANGED
|
@@ -2128,9 +2128,11 @@ bare_fs_exports(js_env_t *env, js_value_t *exports) {
|
|
|
2128
2128
|
V("read", bare_fs_read)
|
|
2129
2129
|
V("readSync", bare_fs_read_sync)
|
|
2130
2130
|
V("readv", bare_fs_readv)
|
|
2131
|
+
V("readvSync", bare_fs_readv_sync)
|
|
2131
2132
|
V("write", bare_fs_write)
|
|
2132
2133
|
V("writeSync", bare_fs_write_sync)
|
|
2133
2134
|
V("writev", bare_fs_writev)
|
|
2135
|
+
V("writevSync", bare_fs_writev_sync)
|
|
2134
2136
|
V("ftruncate", bare_fs_ftruncate)
|
|
2135
2137
|
V("ftruncateSync", bare_fs_ftruncate_sync)
|
|
2136
2138
|
V("chmod", bare_fs_chmod)
|
package/index.js
CHANGED
|
@@ -332,7 +332,7 @@ function readvSync(fd, buffers, pos = -1) {
|
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
async function write(fd, data, offset
|
|
335
|
+
async function write(fd, data, offset, len, pos = -1, cb) {
|
|
336
336
|
if (typeof data === 'string') {
|
|
337
337
|
let encoding = len
|
|
338
338
|
cb = pos
|
|
@@ -369,6 +369,7 @@ async function write(fd, data, offset = 0, len, pos = -1, cb) {
|
|
|
369
369
|
pos = -1
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
+
if (typeof offset !== 'number') offset = 0
|
|
372
373
|
if (typeof len !== 'number') len = data.byteLength - offset
|
|
373
374
|
if (typeof pos !== 'number') pos = -1
|
|
374
375
|
|
|
@@ -387,7 +388,7 @@ async function write(fd, data, offset = 0, len, pos = -1, cb) {
|
|
|
387
388
|
return done(err, bytes, cb)
|
|
388
389
|
}
|
|
389
390
|
|
|
390
|
-
function writeSync(fd, data, offset
|
|
391
|
+
function writeSync(fd, data, offset, len, pos = -1) {
|
|
391
392
|
if (typeof data === 'string') {
|
|
392
393
|
let encoding = len
|
|
393
394
|
pos = offset
|
|
@@ -402,6 +403,7 @@ function writeSync(fd, data, offset = 0, len, pos = -1) {
|
|
|
402
403
|
len = data.byteLength
|
|
403
404
|
}
|
|
404
405
|
|
|
406
|
+
if (typeof offset !== 'number') offset = 0
|
|
405
407
|
if (typeof len !== 'number') len = data.byteLength - offset
|
|
406
408
|
if (typeof pos !== 'number') pos = -1
|
|
407
409
|
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|