@k13engineering/linux-fuse 0.0.1 → 0.0.2
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 +331 -0
- package/dist/lib/abi.js +1019 -0
- package/dist/lib/constants.d.ts +225 -0
- package/dist/lib/constants.js +272 -0
- package/dist/lib/convenience.d.ts +63 -0
- package/dist/lib/convenience.js +463 -0
- package/dist/lib/fuse-lowlevel.d.ts +42 -0
- package/dist/lib/fuse-lowlevel.js +133 -0
- package/dist/lib/index.d.ts +40 -0
- package/dist/lib/index.js +313 -0
- package/dist/lib/linux.d.ts +12 -0
- package/dist/lib/linux.js +32 -0
- package/dist/lib/message.d.ts +50 -0
- package/dist/lib/message.js +177 -0
- package/dist/lib/mount.d.ts +33 -0
- package/dist/lib/mount.js +149 -0
- package/dist/lib/protocol.d.ts +756 -0
- package/dist/lib/protocol.js +3783 -0
- package/dist/lib/server.d.ts +18 -0
- package/dist/lib/server.js +73 -0
- package/dist/lib/syscalls.d.ts +73 -0
- package/dist/lib/syscalls.js +275 -0
- package/package.json +1 -1
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { fuseAttrDefinition, fuseKstatfsDefinition } from "./constants.js";
|
|
2
|
+
type TStructParser<T> = {
|
|
3
|
+
size: number;
|
|
4
|
+
parse: ({ data }: {
|
|
5
|
+
data: Uint8Array;
|
|
6
|
+
}) => T;
|
|
7
|
+
format: ({ value }: {
|
|
8
|
+
value: T;
|
|
9
|
+
}) => Uint8Array;
|
|
10
|
+
};
|
|
11
|
+
type TFuseAttrValue = {
|
|
12
|
+
ino: bigint;
|
|
13
|
+
size: bigint;
|
|
14
|
+
blocks: bigint;
|
|
15
|
+
atime: bigint;
|
|
16
|
+
mtime: bigint;
|
|
17
|
+
ctime: bigint;
|
|
18
|
+
atimensec: bigint;
|
|
19
|
+
mtimensec: bigint;
|
|
20
|
+
ctimensec: bigint;
|
|
21
|
+
mode: bigint;
|
|
22
|
+
nlink: bigint;
|
|
23
|
+
uid: bigint;
|
|
24
|
+
gid: bigint;
|
|
25
|
+
rdev: bigint;
|
|
26
|
+
blksize: bigint;
|
|
27
|
+
padding: bigint;
|
|
28
|
+
};
|
|
29
|
+
type TFuseKstatfsValue = {
|
|
30
|
+
blocks: bigint;
|
|
31
|
+
bfree: bigint;
|
|
32
|
+
bavail: bigint;
|
|
33
|
+
files: bigint;
|
|
34
|
+
ffree: bigint;
|
|
35
|
+
bsize: bigint;
|
|
36
|
+
namelen: bigint;
|
|
37
|
+
frsize: bigint;
|
|
38
|
+
padding: bigint;
|
|
39
|
+
spare: bigint[];
|
|
40
|
+
};
|
|
41
|
+
type TFuseInHeaderValue = {
|
|
42
|
+
len: bigint;
|
|
43
|
+
opcode: bigint;
|
|
44
|
+
unique: bigint;
|
|
45
|
+
nodeid: bigint;
|
|
46
|
+
uid: bigint;
|
|
47
|
+
gid: bigint;
|
|
48
|
+
pid: bigint;
|
|
49
|
+
total_extlen: bigint;
|
|
50
|
+
padding: bigint;
|
|
51
|
+
};
|
|
52
|
+
type TFuseOutHeaderValue = {
|
|
53
|
+
len: bigint;
|
|
54
|
+
error: bigint;
|
|
55
|
+
unique: bigint;
|
|
56
|
+
};
|
|
57
|
+
type TFuseEntryOutValue = {
|
|
58
|
+
nodeid: bigint;
|
|
59
|
+
generation: bigint;
|
|
60
|
+
entry_valid: bigint;
|
|
61
|
+
attr_valid: bigint;
|
|
62
|
+
entry_valid_nsec: bigint;
|
|
63
|
+
attr_valid_nsec: bigint;
|
|
64
|
+
attr: TFuseAttrValue;
|
|
65
|
+
};
|
|
66
|
+
type TFuseGetattrInValue = {
|
|
67
|
+
getattr_flags: bigint;
|
|
68
|
+
dummy: bigint;
|
|
69
|
+
fh: bigint;
|
|
70
|
+
};
|
|
71
|
+
type TFuseAttrOutValue = {
|
|
72
|
+
attr_valid: bigint;
|
|
73
|
+
attr_valid_nsec: bigint;
|
|
74
|
+
dummy: bigint;
|
|
75
|
+
attr: TFuseAttrValue;
|
|
76
|
+
};
|
|
77
|
+
type TFuseSetattrInValue = {
|
|
78
|
+
valid: bigint;
|
|
79
|
+
padding: bigint;
|
|
80
|
+
fh: bigint;
|
|
81
|
+
size: bigint;
|
|
82
|
+
lock_owner: bigint;
|
|
83
|
+
atime: bigint;
|
|
84
|
+
mtime: bigint;
|
|
85
|
+
ctime: bigint;
|
|
86
|
+
atimensec: bigint;
|
|
87
|
+
mtimensec: bigint;
|
|
88
|
+
ctimensec: bigint;
|
|
89
|
+
mode: bigint;
|
|
90
|
+
unused4: bigint;
|
|
91
|
+
uid: bigint;
|
|
92
|
+
gid: bigint;
|
|
93
|
+
unused5: bigint;
|
|
94
|
+
};
|
|
95
|
+
type TFuseOpenInValue = {
|
|
96
|
+
flags: bigint;
|
|
97
|
+
open_flags: bigint;
|
|
98
|
+
};
|
|
99
|
+
type TFuseGetxattrInValue = {
|
|
100
|
+
size: bigint;
|
|
101
|
+
padding: bigint;
|
|
102
|
+
};
|
|
103
|
+
type TFuseGetxattrOutValue = {
|
|
104
|
+
size: bigint;
|
|
105
|
+
padding: bigint;
|
|
106
|
+
};
|
|
107
|
+
type TFuseCreateInValue = {
|
|
108
|
+
flags: bigint;
|
|
109
|
+
mode: bigint;
|
|
110
|
+
umask: bigint;
|
|
111
|
+
open_flags: bigint;
|
|
112
|
+
};
|
|
113
|
+
type TFuseOpenOutValue = {
|
|
114
|
+
fh: bigint;
|
|
115
|
+
open_flags: bigint;
|
|
116
|
+
backing_id: bigint;
|
|
117
|
+
};
|
|
118
|
+
type TFuseReleaseInValue = {
|
|
119
|
+
fh: bigint;
|
|
120
|
+
flags: bigint;
|
|
121
|
+
release_flags: bigint;
|
|
122
|
+
lock_owner: bigint;
|
|
123
|
+
};
|
|
124
|
+
type TFuseFlushInValue = {
|
|
125
|
+
fh: bigint;
|
|
126
|
+
unused: bigint;
|
|
127
|
+
padding: bigint;
|
|
128
|
+
lock_owner: bigint;
|
|
129
|
+
};
|
|
130
|
+
type TFuseReadInValue = {
|
|
131
|
+
fh: bigint;
|
|
132
|
+
offset: bigint;
|
|
133
|
+
size: bigint;
|
|
134
|
+
read_flags: bigint;
|
|
135
|
+
lock_owner: bigint;
|
|
136
|
+
flags: bigint;
|
|
137
|
+
padding: bigint;
|
|
138
|
+
};
|
|
139
|
+
type TFuseWriteInValue = {
|
|
140
|
+
fh: bigint;
|
|
141
|
+
offset: bigint;
|
|
142
|
+
size: bigint;
|
|
143
|
+
write_flags: bigint;
|
|
144
|
+
lock_owner: bigint;
|
|
145
|
+
flags: bigint;
|
|
146
|
+
padding: bigint;
|
|
147
|
+
};
|
|
148
|
+
type TFuseWriteOutValue = {
|
|
149
|
+
size: bigint;
|
|
150
|
+
padding: bigint;
|
|
151
|
+
};
|
|
152
|
+
type TFuseMkdirInValue = {
|
|
153
|
+
mode: bigint;
|
|
154
|
+
umask: bigint;
|
|
155
|
+
};
|
|
156
|
+
type TFuseMknodInValue = {
|
|
157
|
+
mode: bigint;
|
|
158
|
+
rdev: bigint;
|
|
159
|
+
umask: bigint;
|
|
160
|
+
padding: bigint;
|
|
161
|
+
};
|
|
162
|
+
type TFuseRenameInValue = {
|
|
163
|
+
newdir: bigint;
|
|
164
|
+
};
|
|
165
|
+
type TFuseLinkInValue = {
|
|
166
|
+
oldnodeid: bigint;
|
|
167
|
+
};
|
|
168
|
+
type TFuseRename2InValue = {
|
|
169
|
+
newdir: bigint;
|
|
170
|
+
flags: bigint;
|
|
171
|
+
padding: bigint;
|
|
172
|
+
};
|
|
173
|
+
type TFuseFileLockValue = {
|
|
174
|
+
start: bigint;
|
|
175
|
+
end: bigint;
|
|
176
|
+
type: bigint;
|
|
177
|
+
pid: bigint;
|
|
178
|
+
};
|
|
179
|
+
type TFuseLkInValue = {
|
|
180
|
+
fh: bigint;
|
|
181
|
+
owner: bigint;
|
|
182
|
+
lk: TFuseFileLockValue;
|
|
183
|
+
lk_flags: bigint;
|
|
184
|
+
padding: bigint;
|
|
185
|
+
};
|
|
186
|
+
type TFuseLkOutValue = {
|
|
187
|
+
lk: TFuseFileLockValue;
|
|
188
|
+
};
|
|
189
|
+
type TFuseInterruptInValue = {
|
|
190
|
+
unique: bigint;
|
|
191
|
+
};
|
|
192
|
+
type TFuseBmapInValue = {
|
|
193
|
+
block: bigint;
|
|
194
|
+
blocksize: bigint;
|
|
195
|
+
padding: bigint;
|
|
196
|
+
};
|
|
197
|
+
type TFuseBmapOutValue = {
|
|
198
|
+
block: bigint;
|
|
199
|
+
};
|
|
200
|
+
type TFuseIoctlInValue = {
|
|
201
|
+
fh: bigint;
|
|
202
|
+
flags: bigint;
|
|
203
|
+
cmd: bigint;
|
|
204
|
+
arg: bigint;
|
|
205
|
+
in_size: bigint;
|
|
206
|
+
out_size: bigint;
|
|
207
|
+
};
|
|
208
|
+
type TFuseIoctlOutValue = {
|
|
209
|
+
result: bigint;
|
|
210
|
+
flags: bigint;
|
|
211
|
+
in_iovs: bigint;
|
|
212
|
+
out_iovs: bigint;
|
|
213
|
+
};
|
|
214
|
+
type TFusePollInValue = {
|
|
215
|
+
fh: bigint;
|
|
216
|
+
kh: bigint;
|
|
217
|
+
flags: bigint;
|
|
218
|
+
events: bigint;
|
|
219
|
+
};
|
|
220
|
+
type TFusePollOutValue = {
|
|
221
|
+
revents: bigint;
|
|
222
|
+
padding: bigint;
|
|
223
|
+
};
|
|
224
|
+
type TFuseFallocateInValue = {
|
|
225
|
+
fh: bigint;
|
|
226
|
+
offset: bigint;
|
|
227
|
+
length: bigint;
|
|
228
|
+
mode: bigint;
|
|
229
|
+
padding: bigint;
|
|
230
|
+
};
|
|
231
|
+
type TFuseForgetInValue = {
|
|
232
|
+
nlookup: bigint;
|
|
233
|
+
};
|
|
234
|
+
type TFuseBatchForgetInValue = {
|
|
235
|
+
count: bigint;
|
|
236
|
+
dummy: bigint;
|
|
237
|
+
};
|
|
238
|
+
type TFuseForgetOneValue = {
|
|
239
|
+
nodeid: bigint;
|
|
240
|
+
nlookup: bigint;
|
|
241
|
+
};
|
|
242
|
+
type TFuseAccessInValue = {
|
|
243
|
+
mask: bigint;
|
|
244
|
+
padding: bigint;
|
|
245
|
+
};
|
|
246
|
+
type TFuseFsyncInValue = {
|
|
247
|
+
fh: bigint;
|
|
248
|
+
fsync_flags: bigint;
|
|
249
|
+
padding: bigint;
|
|
250
|
+
};
|
|
251
|
+
type TFuseSetxattrInValue = {
|
|
252
|
+
size: bigint;
|
|
253
|
+
flags: bigint;
|
|
254
|
+
setxattr_flags: bigint;
|
|
255
|
+
padding: bigint;
|
|
256
|
+
};
|
|
257
|
+
type TFuseInitInValue = {
|
|
258
|
+
major: bigint;
|
|
259
|
+
minor: bigint;
|
|
260
|
+
max_readahead: bigint;
|
|
261
|
+
flags: bigint;
|
|
262
|
+
flags2: bigint;
|
|
263
|
+
unused: bigint[];
|
|
264
|
+
};
|
|
265
|
+
type TFuseInitOutValue = {
|
|
266
|
+
major: bigint;
|
|
267
|
+
minor: bigint;
|
|
268
|
+
max_readahead: bigint;
|
|
269
|
+
flags: bigint;
|
|
270
|
+
max_background: bigint;
|
|
271
|
+
congestion_threshold: bigint;
|
|
272
|
+
max_write: bigint;
|
|
273
|
+
time_gran: bigint;
|
|
274
|
+
max_pages: bigint;
|
|
275
|
+
map_alignment: bigint;
|
|
276
|
+
flags2: bigint;
|
|
277
|
+
max_stack_depth: bigint;
|
|
278
|
+
request_timeout: bigint;
|
|
279
|
+
unused: bigint[];
|
|
280
|
+
};
|
|
281
|
+
type TFuseStatfsOutValue = {
|
|
282
|
+
st: TFuseKstatfsValue;
|
|
283
|
+
};
|
|
284
|
+
declare const fuseInHeaderParser: TStructParser<TFuseInHeaderValue>;
|
|
285
|
+
declare const fuseOutHeaderParser: TStructParser<TFuseOutHeaderValue>;
|
|
286
|
+
declare const fuseEntryOutParser: TStructParser<TFuseEntryOutValue>;
|
|
287
|
+
declare const fuseGetattrInParser: TStructParser<TFuseGetattrInValue>;
|
|
288
|
+
declare const fuseAttrOutParser: TStructParser<TFuseAttrOutValue>;
|
|
289
|
+
declare const fuseSetattrInParser: TStructParser<TFuseSetattrInValue>;
|
|
290
|
+
declare const fuseOpenInParser: TStructParser<TFuseOpenInValue>;
|
|
291
|
+
declare const fuseGetxattrInParser: TStructParser<TFuseGetxattrInValue>;
|
|
292
|
+
declare const fuseGetxattrOutParser: TStructParser<TFuseGetxattrOutValue>;
|
|
293
|
+
declare const fuseCreateInParser: TStructParser<TFuseCreateInValue>;
|
|
294
|
+
declare const fuseOpenOutParser: TStructParser<TFuseOpenOutValue>;
|
|
295
|
+
declare const fuseReleaseInParser: TStructParser<TFuseReleaseInValue>;
|
|
296
|
+
declare const fuseFlushInParser: TStructParser<TFuseFlushInValue>;
|
|
297
|
+
declare const fuseReadInParser: TStructParser<TFuseReadInValue>;
|
|
298
|
+
declare const fuseWriteInParser: TStructParser<TFuseWriteInValue>;
|
|
299
|
+
declare const fuseWriteOutParser: TStructParser<TFuseWriteOutValue>;
|
|
300
|
+
declare const fuseMkdirInParser: TStructParser<TFuseMkdirInValue>;
|
|
301
|
+
declare const fuseMknodInParser: TStructParser<TFuseMknodInValue>;
|
|
302
|
+
declare const fuseRenameInParser: TStructParser<TFuseRenameInValue>;
|
|
303
|
+
declare const fuseRename2InParser: TStructParser<TFuseRename2InValue>;
|
|
304
|
+
declare const fuseLinkInParser: TStructParser<TFuseLinkInValue>;
|
|
305
|
+
declare const fuseLkInParser: TStructParser<TFuseLkInValue>;
|
|
306
|
+
declare const fuseLkOutParser: TStructParser<TFuseLkOutValue>;
|
|
307
|
+
declare const fuseInterruptInParser: TStructParser<TFuseInterruptInValue>;
|
|
308
|
+
declare const fuseBmapInParser: TStructParser<TFuseBmapInValue>;
|
|
309
|
+
declare const fuseBmapOutParser: TStructParser<TFuseBmapOutValue>;
|
|
310
|
+
declare const fuseIoctlInParser: TStructParser<TFuseIoctlInValue>;
|
|
311
|
+
declare const fuseIoctlOutParser: TStructParser<TFuseIoctlOutValue>;
|
|
312
|
+
declare const fusePollInParser: TStructParser<TFusePollInValue>;
|
|
313
|
+
declare const fusePollOutParser: TStructParser<TFusePollOutValue>;
|
|
314
|
+
declare const fuseFallocateInParser: TStructParser<TFuseFallocateInValue>;
|
|
315
|
+
declare const fuseForgetInParser: TStructParser<TFuseForgetInValue>;
|
|
316
|
+
declare const fuseBatchForgetInParser: TStructParser<TFuseBatchForgetInValue>;
|
|
317
|
+
declare const fuseForgetOneParser: TStructParser<TFuseForgetOneValue>;
|
|
318
|
+
declare const fuseAccessInParser: TStructParser<TFuseAccessInValue>;
|
|
319
|
+
declare const fuseFsyncInParser: TStructParser<TFuseFsyncInValue>;
|
|
320
|
+
declare const fuseSetxattrInParser: TStructParser<TFuseSetxattrInValue>;
|
|
321
|
+
declare const fuseInitInParser: TStructParser<TFuseInitInValue>;
|
|
322
|
+
declare const fuseInitOutParser: TStructParser<TFuseInitOutValue>;
|
|
323
|
+
declare const fuseStatfsOutParser: TStructParser<TFuseStatfsOutValue>;
|
|
324
|
+
declare const toCString: (value: string) => any;
|
|
325
|
+
declare const decodeCString: (data: Uint8Array) => any;
|
|
326
|
+
declare const decodeCStringPair: (data: Uint8Array) => {
|
|
327
|
+
first: any;
|
|
328
|
+
second: any;
|
|
329
|
+
};
|
|
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, };
|