@k13engineering/linux-fuse 0.0.4 → 0.0.5
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/dist/lib/abi.d.ts +88 -2
- package/dist/lib/abi.js +270 -0
- package/dist/lib/constants.d.ts +13 -1
- package/dist/lib/constants.js +16 -0
- package/dist/lib/convenience.d.ts +7 -0
- package/dist/lib/convenience.js +70 -0
- package/dist/lib/protocol.d.ts +155 -1
- package/dist/lib/protocol.js +797 -4
- package/package.json +1 -1
package/dist/lib/abi.d.ts
CHANGED
|
@@ -281,6 +281,83 @@ type TFuseInitOutValue = {
|
|
|
281
281
|
type TFuseStatfsOutValue = {
|
|
282
282
|
st: TFuseKstatfsValue;
|
|
283
283
|
};
|
|
284
|
+
type TFuseLseekInValue = {
|
|
285
|
+
fh: bigint;
|
|
286
|
+
offset: bigint;
|
|
287
|
+
whence: bigint;
|
|
288
|
+
padding: bigint;
|
|
289
|
+
};
|
|
290
|
+
type TFuseLseekOutValue = {
|
|
291
|
+
offset: bigint;
|
|
292
|
+
};
|
|
293
|
+
type TFuseCopyFileRangeInValue = {
|
|
294
|
+
fh_in: bigint;
|
|
295
|
+
off_in: bigint;
|
|
296
|
+
nodeid_out: bigint;
|
|
297
|
+
fh_out: bigint;
|
|
298
|
+
off_out: bigint;
|
|
299
|
+
len: bigint;
|
|
300
|
+
flags: bigint;
|
|
301
|
+
};
|
|
302
|
+
type TFuseSetupmappingInValue = {
|
|
303
|
+
fh: bigint;
|
|
304
|
+
foffset: bigint;
|
|
305
|
+
len: bigint;
|
|
306
|
+
flags: bigint;
|
|
307
|
+
moffset: bigint;
|
|
308
|
+
};
|
|
309
|
+
type TFuseRemovemappingInValue = {
|
|
310
|
+
count: bigint;
|
|
311
|
+
};
|
|
312
|
+
type TFuseRemovemappingOneValue = {
|
|
313
|
+
moffset: bigint;
|
|
314
|
+
len: bigint;
|
|
315
|
+
};
|
|
316
|
+
type TFuseSyncfsInValue = {
|
|
317
|
+
padding: bigint;
|
|
318
|
+
};
|
|
319
|
+
type TFuseSxTimeValue = {
|
|
320
|
+
tv_sec: bigint;
|
|
321
|
+
tv_nsec: bigint;
|
|
322
|
+
__reserved: bigint;
|
|
323
|
+
};
|
|
324
|
+
type TFuseStatxValue = {
|
|
325
|
+
mask: bigint;
|
|
326
|
+
blksize: bigint;
|
|
327
|
+
attributes: bigint;
|
|
328
|
+
nlink: bigint;
|
|
329
|
+
uid: bigint;
|
|
330
|
+
gid: bigint;
|
|
331
|
+
mode: bigint;
|
|
332
|
+
__spare0: bigint[];
|
|
333
|
+
ino: bigint;
|
|
334
|
+
size: bigint;
|
|
335
|
+
blocks: bigint;
|
|
336
|
+
attributes_mask: bigint;
|
|
337
|
+
atime: TFuseSxTimeValue;
|
|
338
|
+
btime: TFuseSxTimeValue;
|
|
339
|
+
ctime: TFuseSxTimeValue;
|
|
340
|
+
mtime: TFuseSxTimeValue;
|
|
341
|
+
rdev_major: bigint;
|
|
342
|
+
rdev_minor: bigint;
|
|
343
|
+
dev_major: bigint;
|
|
344
|
+
dev_minor: bigint;
|
|
345
|
+
__spare2: bigint[];
|
|
346
|
+
};
|
|
347
|
+
type TFuseStatxInValue = {
|
|
348
|
+
getattr_flags: bigint;
|
|
349
|
+
reserved: bigint;
|
|
350
|
+
fh: bigint;
|
|
351
|
+
sx_flags: bigint;
|
|
352
|
+
sx_mask: bigint;
|
|
353
|
+
};
|
|
354
|
+
type TFuseStatxOutValue = {
|
|
355
|
+
attr_valid: bigint;
|
|
356
|
+
attr_valid_nsec: bigint;
|
|
357
|
+
flags: bigint;
|
|
358
|
+
spare: bigint[];
|
|
359
|
+
stat: TFuseStatxValue;
|
|
360
|
+
};
|
|
284
361
|
declare const fuseInHeaderParser: TStructParser<TFuseInHeaderValue>;
|
|
285
362
|
declare const fuseOutHeaderParser: TStructParser<TFuseOutHeaderValue>;
|
|
286
363
|
declare const fuseEntryOutParser: TStructParser<TFuseEntryOutValue>;
|
|
@@ -321,11 +398,20 @@ declare const fuseSetxattrInParser: TStructParser<TFuseSetxattrInValue>;
|
|
|
321
398
|
declare const fuseInitInParser: TStructParser<TFuseInitInValue>;
|
|
322
399
|
declare const fuseInitOutParser: TStructParser<TFuseInitOutValue>;
|
|
323
400
|
declare const fuseStatfsOutParser: TStructParser<TFuseStatfsOutValue>;
|
|
401
|
+
declare const fuseLseekInParser: TStructParser<TFuseLseekInValue>;
|
|
402
|
+
declare const fuseLseekOutParser: TStructParser<TFuseLseekOutValue>;
|
|
403
|
+
declare const fuseCopyFileRangeInParser: TStructParser<TFuseCopyFileRangeInValue>;
|
|
404
|
+
declare const fuseSetupmappingInParser: TStructParser<TFuseSetupmappingInValue>;
|
|
405
|
+
declare const fuseRemovemappingInParser: TStructParser<TFuseRemovemappingInValue>;
|
|
406
|
+
declare const fuseRemovemappingOneParser: TStructParser<TFuseRemovemappingOneValue>;
|
|
407
|
+
declare const fuseSyncfsInParser: TStructParser<TFuseSyncfsInValue>;
|
|
408
|
+
declare const fuseStatxInParser: TStructParser<TFuseStatxInValue>;
|
|
409
|
+
declare const fuseStatxOutParser: TStructParser<TFuseStatxOutValue>;
|
|
324
410
|
declare const toCString: (value: string) => any;
|
|
325
411
|
declare const decodeCString: (data: Uint8Array) => any;
|
|
326
412
|
declare const decodeCStringPair: (data: Uint8Array) => {
|
|
327
413
|
first: any;
|
|
328
414
|
second: any;
|
|
329
415
|
};
|
|
330
|
-
export { decodeCString, decodeCStringPair, toCString, fuseAttrDefinition, fuseCreateInParser, fuseAttrOutParser, fuseBatchForgetInParser, fuseEntryOutParser, fuseForgetInParser, fuseForgetOneParser, fuseGetattrInParser, fuseGetxattrInParser, fuseGetxattrOutParser, fuseInHeaderParser, fuseInitInParser, fuseInitOutParser, fuseAccessInParser, fuseFlushInParser, fuseKstatfsDefinition, fuseMkdirInParser, fuseMknodInParser, fuseOpenInParser, fuseOpenOutParser, fuseOutHeaderParser, fuseReadInParser, fuseReleaseInParser, fuseRename2InParser, fuseRenameInParser, fuseLinkInParser, fuseLkInParser, fuseLkOutParser, fuseInterruptInParser, fuseBmapInParser, fuseBmapOutParser, fuseIoctlInParser, fuseIoctlOutParser, fusePollInParser, fusePollOutParser, fuseFallocateInParser, fuseSetattrInParser, fuseSetxattrInParser, fuseStatfsOutParser, fuseWriteInParser, fuseWriteOutParser, fuseFsyncInParser, };
|
|
331
|
-
export type { TFuseInHeaderValue, TFuseOutHeaderValue, TFuseEntryOutValue, TFuseAttrValue, TFuseGetattrInValue, TFuseAttrOutValue, TFuseSetattrInValue, TFuseOpenInValue, TFuseGetxattrInValue, TFuseGetxattrOutValue, TFuseCreateInValue, TFuseOpenOutValue, TFuseReleaseInValue, TFuseFlushInValue, TFuseReadInValue, TFuseWriteInValue, TFuseWriteOutValue, TFuseMkdirInValue, TFuseMknodInValue, TFuseRenameInValue, TFuseRename2InValue, TFuseLinkInValue, TFuseForgetInValue, TFuseBatchForgetInValue, TFuseForgetOneValue, TFuseAccessInValue, TFuseFsyncInValue, TFuseSetxattrInValue, TFuseInitInValue, TFuseInitOutValue, TFuseStatfsOutValue, TFuseFileLockValue, TFuseLkInValue, TFuseLkOutValue, TFuseInterruptInValue, TFuseBmapInValue, TFuseBmapOutValue, TFuseIoctlInValue, TFuseIoctlOutValue, TFusePollInValue, TFusePollOutValue, TFuseFallocateInValue, };
|
|
416
|
+
export { decodeCString, decodeCStringPair, toCString, fuseAttrDefinition, fuseCreateInParser, fuseAttrOutParser, fuseBatchForgetInParser, fuseEntryOutParser, fuseForgetInParser, fuseForgetOneParser, fuseGetattrInParser, fuseGetxattrInParser, fuseGetxattrOutParser, fuseInHeaderParser, fuseInitInParser, fuseInitOutParser, fuseAccessInParser, fuseFlushInParser, fuseKstatfsDefinition, fuseMkdirInParser, fuseMknodInParser, fuseOpenInParser, fuseOpenOutParser, fuseOutHeaderParser, fuseReadInParser, fuseReleaseInParser, fuseRename2InParser, fuseRenameInParser, fuseLinkInParser, fuseLkInParser, fuseLkOutParser, fuseInterruptInParser, fuseBmapInParser, fuseBmapOutParser, fuseIoctlInParser, fuseIoctlOutParser, fusePollInParser, fusePollOutParser, fuseFallocateInParser, fuseSetattrInParser, fuseSetxattrInParser, fuseStatfsOutParser, fuseWriteInParser, fuseWriteOutParser, fuseFsyncInParser, fuseLseekInParser, fuseLseekOutParser, fuseCopyFileRangeInParser, fuseSetupmappingInParser, fuseRemovemappingInParser, fuseRemovemappingOneParser, fuseSyncfsInParser, fuseStatxInParser, fuseStatxOutParser, };
|
|
417
|
+
export type { TFuseInHeaderValue, TFuseOutHeaderValue, TFuseEntryOutValue, TFuseAttrValue, TFuseGetattrInValue, TFuseAttrOutValue, TFuseSetattrInValue, TFuseOpenInValue, TFuseGetxattrInValue, TFuseGetxattrOutValue, TFuseCreateInValue, TFuseOpenOutValue, TFuseReleaseInValue, TFuseFlushInValue, TFuseReadInValue, TFuseWriteInValue, TFuseWriteOutValue, TFuseMkdirInValue, TFuseMknodInValue, TFuseRenameInValue, TFuseRename2InValue, TFuseLinkInValue, TFuseForgetInValue, TFuseBatchForgetInValue, TFuseForgetOneValue, TFuseAccessInValue, TFuseFsyncInValue, TFuseSetxattrInValue, TFuseInitInValue, TFuseInitOutValue, TFuseStatfsOutValue, TFuseFileLockValue, TFuseLkInValue, TFuseLkOutValue, TFuseInterruptInValue, TFuseBmapInValue, TFuseBmapOutValue, TFuseIoctlInValue, TFuseIoctlOutValue, TFusePollInValue, TFusePollOutValue, TFuseFallocateInValue, TFuseLseekInValue, TFuseLseekOutValue, TFuseCopyFileRangeInValue, TFuseSetupmappingInValue, TFuseRemovemappingInValue, TFuseRemovemappingOneValue, TFuseSyncfsInValue, TFuseSxTimeValue, TFuseStatxValue, TFuseStatxInValue, TFuseStatxOutValue, };
|
package/dist/lib/abi.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
fuseKstatfsDefinition,
|
|
7
7
|
uint16Array,
|
|
8
8
|
uint32Array,
|
|
9
|
+
uint64Array,
|
|
9
10
|
} from "./constants.js";
|
|
10
11
|
|
|
11
12
|
/*type TStructParser<T> = {
|
|
@@ -330,6 +331,94 @@ import {
|
|
|
330
331
|
st: TFuseKstatfsValue;
|
|
331
332
|
};*/
|
|
332
333
|
|
|
334
|
+
/*type TFuseLseekInValue = {
|
|
335
|
+
fh: bigint;
|
|
336
|
+
offset: bigint;
|
|
337
|
+
whence: bigint;
|
|
338
|
+
padding: bigint;
|
|
339
|
+
};*/
|
|
340
|
+
|
|
341
|
+
/*type TFuseLseekOutValue = {
|
|
342
|
+
offset: bigint;
|
|
343
|
+
};*/
|
|
344
|
+
|
|
345
|
+
/*type TFuseCopyFileRangeInValue = {
|
|
346
|
+
fh_in: bigint;
|
|
347
|
+
off_in: bigint;
|
|
348
|
+
nodeid_out: bigint;
|
|
349
|
+
fh_out: bigint;
|
|
350
|
+
off_out: bigint;
|
|
351
|
+
len: bigint;
|
|
352
|
+
flags: bigint;
|
|
353
|
+
};*/
|
|
354
|
+
|
|
355
|
+
/*type TFuseSetupmappingInValue = {
|
|
356
|
+
fh: bigint;
|
|
357
|
+
foffset: bigint;
|
|
358
|
+
len: bigint;
|
|
359
|
+
flags: bigint;
|
|
360
|
+
moffset: bigint;
|
|
361
|
+
};*/
|
|
362
|
+
|
|
363
|
+
/*type TFuseRemovemappingInValue = {
|
|
364
|
+
count: bigint;
|
|
365
|
+
};*/
|
|
366
|
+
|
|
367
|
+
/*type TFuseRemovemappingOneValue = {
|
|
368
|
+
moffset: bigint;
|
|
369
|
+
len: bigint;
|
|
370
|
+
};*/
|
|
371
|
+
|
|
372
|
+
/*type TFuseSyncfsInValue = {
|
|
373
|
+
padding: bigint;
|
|
374
|
+
};*/
|
|
375
|
+
|
|
376
|
+
/*type TFuseSxTimeValue = {
|
|
377
|
+
tv_sec: bigint;
|
|
378
|
+
tv_nsec: bigint;
|
|
379
|
+
__reserved: bigint;
|
|
380
|
+
};*/
|
|
381
|
+
|
|
382
|
+
/*type TFuseStatxValue = {
|
|
383
|
+
mask: bigint;
|
|
384
|
+
blksize: bigint;
|
|
385
|
+
attributes: bigint;
|
|
386
|
+
nlink: bigint;
|
|
387
|
+
uid: bigint;
|
|
388
|
+
gid: bigint;
|
|
389
|
+
mode: bigint;
|
|
390
|
+
__spare0: bigint[];
|
|
391
|
+
ino: bigint;
|
|
392
|
+
size: bigint;
|
|
393
|
+
blocks: bigint;
|
|
394
|
+
attributes_mask: bigint;
|
|
395
|
+
atime: TFuseSxTimeValue;
|
|
396
|
+
btime: TFuseSxTimeValue;
|
|
397
|
+
ctime: TFuseSxTimeValue;
|
|
398
|
+
mtime: TFuseSxTimeValue;
|
|
399
|
+
rdev_major: bigint;
|
|
400
|
+
rdev_minor: bigint;
|
|
401
|
+
dev_major: bigint;
|
|
402
|
+
dev_minor: bigint;
|
|
403
|
+
__spare2: bigint[];
|
|
404
|
+
};*/
|
|
405
|
+
|
|
406
|
+
/*type TFuseStatxInValue = {
|
|
407
|
+
getattr_flags: bigint;
|
|
408
|
+
reserved: bigint;
|
|
409
|
+
fh: bigint;
|
|
410
|
+
sx_flags: bigint;
|
|
411
|
+
sx_mask: bigint;
|
|
412
|
+
};*/
|
|
413
|
+
|
|
414
|
+
/*type TFuseStatxOutValue = {
|
|
415
|
+
attr_valid: bigint;
|
|
416
|
+
attr_valid_nsec: bigint;
|
|
417
|
+
flags: bigint;
|
|
418
|
+
spare: bigint[];
|
|
419
|
+
stat: TFuseStatxValue;
|
|
420
|
+
};*/
|
|
421
|
+
|
|
333
422
|
const fuseInHeaderParser/*: TStructParser<TFuseInHeaderValue>*/ = define({
|
|
334
423
|
definition: {
|
|
335
424
|
type: "struct",
|
|
@@ -887,6 +976,167 @@ const fuseStatfsOutParser/*: TStructParser<TFuseStatfsOutValue>*/ = define({
|
|
|
887
976
|
},
|
|
888
977
|
}).parser({ abi });
|
|
889
978
|
|
|
979
|
+
const fuseLseekInParser/*: TStructParser<TFuseLseekInValue>*/ = define({
|
|
980
|
+
definition: {
|
|
981
|
+
type: "struct",
|
|
982
|
+
packed: false,
|
|
983
|
+
fixedAbi: {},
|
|
984
|
+
fields: [
|
|
985
|
+
{ name: "fh", definition: types.UInt64 },
|
|
986
|
+
{ name: "offset", definition: types.UInt64 },
|
|
987
|
+
{ name: "whence", definition: types.UInt32 },
|
|
988
|
+
{ name: "padding", definition: types.UInt32 },
|
|
989
|
+
],
|
|
990
|
+
},
|
|
991
|
+
}).parser({ abi });
|
|
992
|
+
|
|
993
|
+
const fuseLseekOutParser/*: TStructParser<TFuseLseekOutValue>*/ = define({
|
|
994
|
+
definition: {
|
|
995
|
+
type: "struct",
|
|
996
|
+
packed: false,
|
|
997
|
+
fixedAbi: {},
|
|
998
|
+
fields: [
|
|
999
|
+
{ name: "offset", definition: types.UInt64 },
|
|
1000
|
+
],
|
|
1001
|
+
},
|
|
1002
|
+
}).parser({ abi });
|
|
1003
|
+
|
|
1004
|
+
const fuseCopyFileRangeInParser/*: TStructParser<TFuseCopyFileRangeInValue>*/ = define({
|
|
1005
|
+
definition: {
|
|
1006
|
+
type: "struct",
|
|
1007
|
+
packed: false,
|
|
1008
|
+
fixedAbi: {},
|
|
1009
|
+
fields: [
|
|
1010
|
+
{ name: "fh_in", definition: types.UInt64 },
|
|
1011
|
+
{ name: "off_in", definition: types.UInt64 },
|
|
1012
|
+
{ name: "nodeid_out", definition: types.UInt64 },
|
|
1013
|
+
{ name: "fh_out", definition: types.UInt64 },
|
|
1014
|
+
{ name: "off_out", definition: types.UInt64 },
|
|
1015
|
+
{ name: "len", definition: types.UInt64 },
|
|
1016
|
+
{ name: "flags", definition: types.UInt64 },
|
|
1017
|
+
],
|
|
1018
|
+
},
|
|
1019
|
+
}).parser({ abi });
|
|
1020
|
+
|
|
1021
|
+
const fuseSetupmappingInParser/*: TStructParser<TFuseSetupmappingInValue>*/ = define({
|
|
1022
|
+
definition: {
|
|
1023
|
+
type: "struct",
|
|
1024
|
+
packed: false,
|
|
1025
|
+
fixedAbi: {},
|
|
1026
|
+
fields: [
|
|
1027
|
+
{ name: "fh", definition: types.UInt64 },
|
|
1028
|
+
{ name: "foffset", definition: types.UInt64 },
|
|
1029
|
+
{ name: "len", definition: types.UInt64 },
|
|
1030
|
+
{ name: "flags", definition: types.UInt64 },
|
|
1031
|
+
{ name: "moffset", definition: types.UInt64 },
|
|
1032
|
+
],
|
|
1033
|
+
},
|
|
1034
|
+
}).parser({ abi });
|
|
1035
|
+
|
|
1036
|
+
const fuseRemovemappingInParser/*: TStructParser<TFuseRemovemappingInValue>*/ = define({
|
|
1037
|
+
definition: {
|
|
1038
|
+
type: "struct",
|
|
1039
|
+
packed: false,
|
|
1040
|
+
fixedAbi: {},
|
|
1041
|
+
fields: [
|
|
1042
|
+
{ name: "count", definition: types.UInt32 },
|
|
1043
|
+
],
|
|
1044
|
+
},
|
|
1045
|
+
}).parser({ abi });
|
|
1046
|
+
|
|
1047
|
+
const fuseRemovemappingOneParser/*: TStructParser<TFuseRemovemappingOneValue>*/ = define({
|
|
1048
|
+
definition: {
|
|
1049
|
+
type: "struct",
|
|
1050
|
+
packed: false,
|
|
1051
|
+
fixedAbi: {},
|
|
1052
|
+
fields: [
|
|
1053
|
+
{ name: "moffset", definition: types.UInt64 },
|
|
1054
|
+
{ name: "len", definition: types.UInt64 },
|
|
1055
|
+
],
|
|
1056
|
+
},
|
|
1057
|
+
}).parser({ abi });
|
|
1058
|
+
|
|
1059
|
+
const fuseSyncfsInParser/*: TStructParser<TFuseSyncfsInValue>*/ = define({
|
|
1060
|
+
definition: {
|
|
1061
|
+
type: "struct",
|
|
1062
|
+
packed: false,
|
|
1063
|
+
fixedAbi: {},
|
|
1064
|
+
fields: [
|
|
1065
|
+
{ name: "padding", definition: types.UInt64 },
|
|
1066
|
+
],
|
|
1067
|
+
},
|
|
1068
|
+
}).parser({ abi });
|
|
1069
|
+
|
|
1070
|
+
const fuseSxTimeDefinition = {
|
|
1071
|
+
type: "struct",
|
|
1072
|
+
packed: false,
|
|
1073
|
+
fixedAbi: {},
|
|
1074
|
+
fields: [
|
|
1075
|
+
{ name: "tv_sec", definition: types.Int64 },
|
|
1076
|
+
{ name: "tv_nsec", definition: types.UInt32 },
|
|
1077
|
+
{ name: "__reserved", definition: types.Int32 },
|
|
1078
|
+
],
|
|
1079
|
+
} /*as const*/;
|
|
1080
|
+
|
|
1081
|
+
const fuseStatxDefinition = {
|
|
1082
|
+
type: "struct",
|
|
1083
|
+
packed: false,
|
|
1084
|
+
fixedAbi: {},
|
|
1085
|
+
fields: [
|
|
1086
|
+
{ name: "mask", definition: types.UInt32 },
|
|
1087
|
+
{ name: "blksize", definition: types.UInt32 },
|
|
1088
|
+
{ name: "attributes", definition: types.UInt64 },
|
|
1089
|
+
{ name: "nlink", definition: types.UInt32 },
|
|
1090
|
+
{ name: "uid", definition: types.UInt32 },
|
|
1091
|
+
{ name: "gid", definition: types.UInt32 },
|
|
1092
|
+
{ name: "mode", definition: types.UInt16 },
|
|
1093
|
+
{ name: "__spare0", definition: uint16Array(1) },
|
|
1094
|
+
{ name: "ino", definition: types.UInt64 },
|
|
1095
|
+
{ name: "size", definition: types.UInt64 },
|
|
1096
|
+
{ name: "blocks", definition: types.UInt64 },
|
|
1097
|
+
{ name: "attributes_mask", definition: types.UInt64 },
|
|
1098
|
+
{ name: "atime", definition: fuseSxTimeDefinition },
|
|
1099
|
+
{ name: "btime", definition: fuseSxTimeDefinition },
|
|
1100
|
+
{ name: "ctime", definition: fuseSxTimeDefinition },
|
|
1101
|
+
{ name: "mtime", definition: fuseSxTimeDefinition },
|
|
1102
|
+
{ name: "rdev_major", definition: types.UInt32 },
|
|
1103
|
+
{ name: "rdev_minor", definition: types.UInt32 },
|
|
1104
|
+
{ name: "dev_major", definition: types.UInt32 },
|
|
1105
|
+
{ name: "dev_minor", definition: types.UInt32 },
|
|
1106
|
+
{ name: "__spare2", definition: uint64Array(14) },
|
|
1107
|
+
],
|
|
1108
|
+
} /*as const*/;
|
|
1109
|
+
|
|
1110
|
+
const fuseStatxInParser/*: TStructParser<TFuseStatxInValue>*/ = define({
|
|
1111
|
+
definition: {
|
|
1112
|
+
type: "struct",
|
|
1113
|
+
packed: false,
|
|
1114
|
+
fixedAbi: {},
|
|
1115
|
+
fields: [
|
|
1116
|
+
{ name: "getattr_flags", definition: types.UInt32 },
|
|
1117
|
+
{ name: "reserved", definition: types.UInt32 },
|
|
1118
|
+
{ name: "fh", definition: types.UInt64 },
|
|
1119
|
+
{ name: "sx_flags", definition: types.UInt32 },
|
|
1120
|
+
{ name: "sx_mask", definition: types.UInt32 },
|
|
1121
|
+
],
|
|
1122
|
+
},
|
|
1123
|
+
}).parser({ abi });
|
|
1124
|
+
|
|
1125
|
+
const fuseStatxOutParser/*: TStructParser<TFuseStatxOutValue>*/ = define({
|
|
1126
|
+
definition: {
|
|
1127
|
+
type: "struct",
|
|
1128
|
+
packed: false,
|
|
1129
|
+
fixedAbi: {},
|
|
1130
|
+
fields: [
|
|
1131
|
+
{ name: "attr_valid", definition: types.UInt64 },
|
|
1132
|
+
{ name: "attr_valid_nsec", definition: types.UInt32 },
|
|
1133
|
+
{ name: "flags", definition: types.UInt32 },
|
|
1134
|
+
{ name: "spare", definition: uint64Array(2) },
|
|
1135
|
+
{ name: "stat", definition: fuseStatxDefinition },
|
|
1136
|
+
],
|
|
1137
|
+
},
|
|
1138
|
+
}).parser({ abi });
|
|
1139
|
+
|
|
890
1140
|
const textEncoder = new TextEncoder();
|
|
891
1141
|
|
|
892
1142
|
const toCString = (value/*: string*/) => {
|
|
@@ -971,6 +1221,15 @@ export {
|
|
|
971
1221
|
fuseWriteInParser,
|
|
972
1222
|
fuseWriteOutParser,
|
|
973
1223
|
fuseFsyncInParser,
|
|
1224
|
+
fuseLseekInParser,
|
|
1225
|
+
fuseLseekOutParser,
|
|
1226
|
+
fuseCopyFileRangeInParser,
|
|
1227
|
+
fuseSetupmappingInParser,
|
|
1228
|
+
fuseRemovemappingInParser,
|
|
1229
|
+
fuseRemovemappingOneParser,
|
|
1230
|
+
fuseSyncfsInParser,
|
|
1231
|
+
fuseStatxInParser,
|
|
1232
|
+
fuseStatxOutParser,
|
|
974
1233
|
};
|
|
975
1234
|
|
|
976
1235
|
/*export type {
|
|
@@ -1016,4 +1275,15 @@ export {
|
|
|
1016
1275
|
TFusePollInValue,
|
|
1017
1276
|
TFusePollOutValue,
|
|
1018
1277
|
TFuseFallocateInValue,
|
|
1278
|
+
TFuseLseekInValue,
|
|
1279
|
+
TFuseLseekOutValue,
|
|
1280
|
+
TFuseCopyFileRangeInValue,
|
|
1281
|
+
TFuseSetupmappingInValue,
|
|
1282
|
+
TFuseRemovemappingInValue,
|
|
1283
|
+
TFuseRemovemappingOneValue,
|
|
1284
|
+
TFuseSyncfsInValue,
|
|
1285
|
+
TFuseSxTimeValue,
|
|
1286
|
+
TFuseStatxValue,
|
|
1287
|
+
TFuseStatxInValue,
|
|
1288
|
+
TFuseStatxOutValue,
|
|
1019
1289
|
};*/
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -80,6 +80,13 @@ declare const opcode: {
|
|
|
80
80
|
readonly FALLOCATE: 43;
|
|
81
81
|
readonly READDIRPLUS: 44;
|
|
82
82
|
readonly RENAME2: 45;
|
|
83
|
+
readonly LSEEK: 46;
|
|
84
|
+
readonly COPY_FILE_RANGE: 47;
|
|
85
|
+
readonly SETUPMAPPING: 48;
|
|
86
|
+
readonly REMOVEMAPPING: 49;
|
|
87
|
+
readonly SYNCFS: 50;
|
|
88
|
+
readonly TMPFILE: 51;
|
|
89
|
+
readonly STATX: 52;
|
|
83
90
|
};
|
|
84
91
|
declare const openCloseOnExecFlag: any;
|
|
85
92
|
declare const abi: {
|
|
@@ -97,6 +104,11 @@ declare const uint32Array: (length: number) => {
|
|
|
97
104
|
readonly elementType: any;
|
|
98
105
|
readonly length: number;
|
|
99
106
|
};
|
|
107
|
+
declare const uint64Array: (length: number) => {
|
|
108
|
+
readonly type: "array";
|
|
109
|
+
readonly elementType: any;
|
|
110
|
+
readonly length: number;
|
|
111
|
+
};
|
|
100
112
|
declare const fuseAttrDefinition: {
|
|
101
113
|
readonly type: "struct";
|
|
102
114
|
readonly packed: false;
|
|
@@ -222,4 +234,4 @@ declare const MOUNT_ATTR_NODEV: bigint;
|
|
|
222
234
|
declare const MOUNT_ATTR_NOEXEC: bigint;
|
|
223
235
|
declare const MOUNT_ATTR_NOSYMFOLLOW: bigint;
|
|
224
236
|
declare const MOUNT_ATTR_NODIRATIME: bigint;
|
|
225
|
-
export { abi, DT_BLK, DT_CHR, DT_DIR, DT_FIFO, DT_LNK, DT_REG, DT_SOCK, DT_UNKNOWN, EINVAL, ENOENT, ENOSYS, ENOTDIR, EIO, EPROTO, ESTALE, FATTR_ATIME, FATTR_ATIME_NOW, FATTR_FH, FATTR_GID, FATTR_MODE, FATTR_MTIME, FATTR_MTIME_NOW, FATTR_SIZE, FATTR_UID, FUSE_BIG_WRITES, FUSE_GETATTR_FH, FUSE_INIT_FLAGS, FUSE_MIN_READ_BUFFER, FUSE_ROOT_ID, MS_NODEV, MS_NOSUID, MNT_DETACH, opcode, openCloseOnExecFlag, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFMT, S_IFREG, S_IFSOCK, textEncoder, uint16Array, uint32Array, fuseAttrDefinition, fuseKstatfsDefinition, fuseFileLockDefinition, FOPEN_DIRECT_IO, FOPEN_KEEP_CACHE, FOPEN_NONSEEKABLE, FSOPEN_CLOEXEC, FSCONFIG_SET_STRING, FSCONFIG_SET_FLAG, FSCONFIG_CMD_CREATE, FSMOUNT_CLOEXEC, MOVE_MOUNT_F_EMPTY_PATH, AT_FCWD, MOUNT_ATTR_RDONLY, MOUNT_ATTR_NOSUID, MOUNT_ATTR_NODEV, MOUNT_ATTR_NOEXEC, MOUNT_ATTR_NOSYMFOLLOW, MOUNT_ATTR_NODIRATIME, };
|
|
237
|
+
export { abi, DT_BLK, DT_CHR, DT_DIR, DT_FIFO, DT_LNK, DT_REG, DT_SOCK, DT_UNKNOWN, EINVAL, ENOENT, ENOSYS, ENOTDIR, EIO, EPROTO, ESTALE, FATTR_ATIME, FATTR_ATIME_NOW, FATTR_FH, FATTR_GID, FATTR_MODE, FATTR_MTIME, FATTR_MTIME_NOW, FATTR_SIZE, FATTR_UID, FUSE_BIG_WRITES, FUSE_GETATTR_FH, FUSE_INIT_FLAGS, FUSE_MIN_READ_BUFFER, FUSE_ROOT_ID, MS_NODEV, MS_NOSUID, MNT_DETACH, opcode, openCloseOnExecFlag, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFMT, S_IFREG, S_IFSOCK, textEncoder, uint16Array, uint32Array, uint64Array, fuseAttrDefinition, fuseKstatfsDefinition, fuseFileLockDefinition, FOPEN_DIRECT_IO, FOPEN_KEEP_CACHE, FOPEN_NONSEEKABLE, FSOPEN_CLOEXEC, FSCONFIG_SET_STRING, FSCONFIG_SET_FLAG, FSCONFIG_CMD_CREATE, FSMOUNT_CLOEXEC, MOVE_MOUNT_F_EMPTY_PATH, AT_FCWD, MOUNT_ATTR_RDONLY, MOUNT_ATTR_NOSUID, MOUNT_ATTR_NODEV, MOUNT_ATTR_NOEXEC, MOUNT_ATTR_NOSYMFOLLOW, MOUNT_ATTR_NODIRATIME, };
|
package/dist/lib/constants.js
CHANGED
|
@@ -97,6 +97,13 @@ const opcode = {
|
|
|
97
97
|
FALLOCATE: 43,
|
|
98
98
|
READDIRPLUS: 44,
|
|
99
99
|
RENAME2: 45,
|
|
100
|
+
LSEEK: 46,
|
|
101
|
+
COPY_FILE_RANGE: 47,
|
|
102
|
+
SETUPMAPPING: 48,
|
|
103
|
+
REMOVEMAPPING: 49,
|
|
104
|
+
SYNCFS: 50,
|
|
105
|
+
TMPFILE: 51,
|
|
106
|
+
STATX: 52,
|
|
100
107
|
} /*as const*/;
|
|
101
108
|
|
|
102
109
|
const openCloseOnExecFlag = "O_CLOEXEC" in nodeFs.constants
|
|
@@ -125,6 +132,14 @@ const uint32Array = (length/*: number*/) => {
|
|
|
125
132
|
} /*as const*/;
|
|
126
133
|
};
|
|
127
134
|
|
|
135
|
+
const uint64Array = (length/*: number*/) => {
|
|
136
|
+
return {
|
|
137
|
+
type: "array",
|
|
138
|
+
elementType: types.UInt64,
|
|
139
|
+
length,
|
|
140
|
+
} /*as const*/;
|
|
141
|
+
};
|
|
142
|
+
|
|
128
143
|
const fuseAttrDefinition = {
|
|
129
144
|
type: "struct",
|
|
130
145
|
packed: false,
|
|
@@ -245,6 +260,7 @@ export {
|
|
|
245
260
|
textEncoder,
|
|
246
261
|
uint16Array,
|
|
247
262
|
uint32Array,
|
|
263
|
+
uint64Array,
|
|
248
264
|
fuseAttrDefinition,
|
|
249
265
|
fuseKstatfsDefinition,
|
|
250
266
|
fuseFileLockDefinition,
|
|
@@ -55,6 +55,13 @@ type TFuseServerInterface = {
|
|
|
55
55
|
notifyReply: (req: TConvenienceRequest<"NOTIFY_REPLY">) => Promise<void>;
|
|
56
56
|
fallocate: (req: TConvenienceRequest<"FALLOCATE">) => Promise<TConvenienceResponse<"FALLOCATE">>;
|
|
57
57
|
readdirplus: (req: TConvenienceRequest<"READDIRPLUS">) => Promise<TConvenienceResponse<"READDIRPLUS">>;
|
|
58
|
+
lseek: (req: TConvenienceRequest<"LSEEK">) => Promise<TConvenienceResponse<"LSEEK">>;
|
|
59
|
+
copyFileRange: (req: TConvenienceRequest<"COPY_FILE_RANGE">) => Promise<TConvenienceResponse<"COPY_FILE_RANGE">>;
|
|
60
|
+
setupMapping: (req: TConvenienceRequest<"SETUPMAPPING">) => Promise<TConvenienceResponse<"SETUPMAPPING">>;
|
|
61
|
+
removeMapping: (req: TConvenienceRequest<"REMOVEMAPPING">) => Promise<TConvenienceResponse<"REMOVEMAPPING">>;
|
|
62
|
+
syncfs: (req: TConvenienceRequest<"SYNCFS">) => Promise<TConvenienceResponse<"SYNCFS">>;
|
|
63
|
+
tmpfile: (req: TConvenienceRequest<"TMPFILE">) => Promise<TConvenienceResponse<"TMPFILE">>;
|
|
64
|
+
statx: (req: TConvenienceRequest<"STATX">) => Promise<TConvenienceResponse<"STATX">>;
|
|
58
65
|
};
|
|
59
66
|
declare const createConvenienceRequestHandler: ({ serverInterface }: {
|
|
60
67
|
serverInterface: TFuseServerInterface;
|
package/dist/lib/convenience.js
CHANGED
|
@@ -51,6 +51,13 @@
|
|
|
51
51
|
notifyReply: (req: TConvenienceRequest<"NOTIFY_REPLY">) => Promise<void>;
|
|
52
52
|
fallocate: (req: TConvenienceRequest<"FALLOCATE">) => Promise<TConvenienceResponse<"FALLOCATE">>;
|
|
53
53
|
readdirplus: (req: TConvenienceRequest<"READDIRPLUS">) => Promise<TConvenienceResponse<"READDIRPLUS">>;
|
|
54
|
+
lseek: (req: TConvenienceRequest<"LSEEK">) => Promise<TConvenienceResponse<"LSEEK">>;
|
|
55
|
+
copyFileRange: (req: TConvenienceRequest<"COPY_FILE_RANGE">) => Promise<TConvenienceResponse<"COPY_FILE_RANGE">>;
|
|
56
|
+
setupMapping: (req: TConvenienceRequest<"SETUPMAPPING">) => Promise<TConvenienceResponse<"SETUPMAPPING">>;
|
|
57
|
+
removeMapping: (req: TConvenienceRequest<"REMOVEMAPPING">) => Promise<TConvenienceResponse<"REMOVEMAPPING">>;
|
|
58
|
+
syncfs: (req: TConvenienceRequest<"SYNCFS">) => Promise<TConvenienceResponse<"SYNCFS">>;
|
|
59
|
+
tmpfile: (req: TConvenienceRequest<"TMPFILE">) => Promise<TConvenienceResponse<"TMPFILE">>;
|
|
60
|
+
statx: (req: TConvenienceRequest<"STATX">) => Promise<TConvenienceResponse<"STATX">>;
|
|
54
61
|
};*/
|
|
55
62
|
|
|
56
63
|
const createConvenienceRequestHandler = ({
|
|
@@ -442,6 +449,69 @@ const createConvenienceRequestHandler = ({
|
|
|
442
449
|
};
|
|
443
450
|
}
|
|
444
451
|
|
|
452
|
+
case "LSEEK": {
|
|
453
|
+
const response = await serverInterface.lseek(request);
|
|
454
|
+
|
|
455
|
+
return {
|
|
456
|
+
...response,
|
|
457
|
+
unique: request.unique,
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
case "COPY_FILE_RANGE": {
|
|
462
|
+
const response = await serverInterface.copyFileRange(request);
|
|
463
|
+
|
|
464
|
+
return {
|
|
465
|
+
...response,
|
|
466
|
+
unique: request.unique,
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
case "SETUPMAPPING": {
|
|
471
|
+
const response = await serverInterface.setupMapping(request);
|
|
472
|
+
|
|
473
|
+
return {
|
|
474
|
+
...response,
|
|
475
|
+
unique: request.unique,
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
case "REMOVEMAPPING": {
|
|
480
|
+
const response = await serverInterface.removeMapping(request);
|
|
481
|
+
|
|
482
|
+
return {
|
|
483
|
+
...response,
|
|
484
|
+
unique: request.unique,
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
case "SYNCFS": {
|
|
489
|
+
const response = await serverInterface.syncfs(request);
|
|
490
|
+
|
|
491
|
+
return {
|
|
492
|
+
...response,
|
|
493
|
+
unique: request.unique,
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
case "TMPFILE": {
|
|
498
|
+
const response = await serverInterface.tmpfile(request);
|
|
499
|
+
|
|
500
|
+
return {
|
|
501
|
+
...response,
|
|
502
|
+
unique: request.unique,
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
case "STATX": {
|
|
507
|
+
const response = await serverInterface.statx(request);
|
|
508
|
+
|
|
509
|
+
return {
|
|
510
|
+
...response,
|
|
511
|
+
unique: request.unique,
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
|
|
445
515
|
default: {
|
|
446
516
|
// @ts-expect-error exhaustive check
|
|
447
517
|
throw Error(`unsupported opcode: ${request.opcode}`);
|