@zenfs/core 2.0.0 → 2.1.1
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/backends/backend.js +6 -5
- package/dist/backends/cow.d.ts +2 -2
- package/dist/backends/cow.js +39 -58
- package/dist/backends/fetch.js +27 -29
- package/dist/backends/passthrough.d.ts +2 -3
- package/dist/backends/passthrough.js +84 -199
- package/dist/backends/port.d.ts +16 -3
- package/dist/backends/port.js +61 -30
- package/dist/backends/single_buffer.d.ts +52 -46
- package/dist/backends/single_buffer.js +462 -219
- package/dist/backends/store/fs.d.ts +16 -10
- package/dist/backends/store/fs.js +227 -242
- package/dist/backends/store/store.d.ts +3 -3
- package/dist/backends/store/store.js +11 -10
- package/dist/config.d.ts +2 -2
- package/dist/config.js +10 -11
- package/dist/internal/devices.d.ts +2 -2
- package/dist/internal/devices.js +39 -49
- package/dist/internal/error.d.ts +9 -204
- package/dist/internal/error.js +19 -288
- package/dist/internal/file_index.d.ts +1 -1
- package/dist/internal/file_index.js +9 -9
- package/dist/internal/filesystem.d.ts +23 -8
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index_fs.d.ts +2 -2
- package/dist/internal/index_fs.js +19 -19
- package/dist/internal/inode.d.ts +81 -103
- package/dist/internal/inode.js +336 -195
- package/dist/mixins/async.js +32 -28
- package/dist/mixins/mutexed.d.ts +4 -4
- package/dist/mixins/mutexed.js +39 -39
- package/dist/mixins/readonly.d.ts +2 -2
- package/dist/mixins/readonly.js +20 -20
- package/dist/mixins/sync.js +2 -2
- package/dist/polyfills.js +1 -1
- package/dist/readline.js +1 -1
- package/dist/utils.d.ts +8 -5
- package/dist/utils.js +14 -17
- package/dist/vfs/acl.d.ts +8 -8
- package/dist/vfs/acl.js +66 -47
- package/dist/vfs/async.d.ts +2 -2
- package/dist/vfs/async.js +6 -8
- package/dist/vfs/dir.d.ts +1 -1
- package/dist/vfs/dir.js +3 -4
- package/dist/vfs/file.js +33 -24
- package/dist/vfs/flags.js +3 -3
- package/dist/vfs/ioctl.d.ts +8 -7
- package/dist/vfs/ioctl.js +132 -27
- package/dist/vfs/promises.d.ts +3 -3
- package/dist/vfs/promises.js +200 -235
- package/dist/vfs/shared.d.ts +1 -12
- package/dist/vfs/shared.js +7 -35
- package/dist/vfs/streams.js +9 -9
- package/dist/vfs/sync.d.ts +1 -2
- package/dist/vfs/sync.js +158 -170
- package/dist/vfs/watchers.js +8 -8
- package/dist/vfs/xattr.js +89 -106
- package/package.json +5 -3
- package/scripts/test.js +2 -2
- package/tests/assignment.ts +1 -1
- package/tests/backend/port.test.ts +4 -4
- package/tests/backend/single-buffer.test.ts +39 -10
- package/tests/backend/single-buffer.worker.js +30 -0
- package/tests/common/context.test.ts +2 -2
- package/tests/common/mutex.test.ts +9 -9
- package/tests/fetch/fetch.ts +1 -1
- package/tests/fetch/run.sh +1 -1
- package/tests/fs/append.test.ts +4 -4
- package/tests/fs/directory.test.ts +25 -25
- package/tests/fs/errors.test.ts +15 -19
- package/tests/fs/links.test.ts +3 -2
- package/tests/fs/open.test.ts +4 -21
- package/tests/fs/permissions.test.ts +8 -13
- package/tests/fs/read.test.ts +10 -9
- package/tests/fs/readFile.test.ts +8 -24
- package/tests/fs/rename.test.ts +4 -9
- package/tests/fs/stat.test.ts +2 -2
- package/tests/fs/times.test.ts +6 -6
- package/tests/fs/truncate.test.ts +8 -36
- package/tests/fs/watch.test.ts +10 -10
- package/tests/fs/write.test.ts +77 -13
- package/tests/fs/xattr.test.ts +7 -7
- package/tests/logs.js +2 -2
- package/tests/setup/port.ts +6 -0
- package/dist/internal/log.d.ts +0 -139
- package/dist/internal/log.js +0 -219
- package/tests/fs/writeFile.test.ts +0 -70
package/dist/internal/inode.js
CHANGED
|
@@ -36,75 +36,95 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
|
|
|
36
36
|
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
37
37
|
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
40
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
41
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
42
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
43
|
+
};
|
|
44
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
45
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
46
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
47
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
48
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
49
|
+
};
|
|
50
|
+
import { withErrno } from 'kerium';
|
|
51
|
+
import { crit, warn } from 'kerium/log';
|
|
52
|
+
import { field, packed, sizeof, struct, types as t } from 'memium';
|
|
53
|
+
import { decodeUTF8, encodeUTF8, pick } from 'utilium';
|
|
54
|
+
import { BufferView } from 'utilium/buffer.js';
|
|
40
55
|
import * as c from '../vfs/constants.js';
|
|
41
|
-
import { size_max } from '../vfs/constants.js';
|
|
42
56
|
import { Stats } from '../vfs/stats.js';
|
|
43
57
|
import { defaultContext } from './contexts.js';
|
|
44
|
-
import { Errno, ErrnoError } from './error.js';
|
|
45
|
-
import { crit } from './log.js';
|
|
46
58
|
/**
|
|
47
59
|
* Root inode
|
|
48
60
|
* @hidden
|
|
49
61
|
*/
|
|
50
62
|
export const rootIno = 0;
|
|
51
|
-
|
|
63
|
+
/** 4 KiB minus static inode data */
|
|
64
|
+
const maxDynamicData = 3968;
|
|
52
65
|
let Attribute = (() => {
|
|
66
|
+
var _Attribute_keySize_accessor_storage, _Attribute_valueSize_accessor_storage;
|
|
53
67
|
var _a, _b;
|
|
54
|
-
let _classDecorators = [struct()];
|
|
68
|
+
let _classDecorators = [struct(packed)];
|
|
55
69
|
let _classDescriptor;
|
|
56
70
|
let _classExtraInitializers = [];
|
|
57
71
|
let _classThis;
|
|
72
|
+
let _classSuper = Uint8Array;
|
|
58
73
|
let _keySize_decorators;
|
|
59
74
|
let _keySize_initializers = [];
|
|
60
75
|
let _keySize_extraInitializers = [];
|
|
61
76
|
let _valueSize_decorators;
|
|
62
77
|
let _valueSize_initializers = [];
|
|
63
78
|
let _valueSize_extraInitializers = [];
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
get key() {
|
|
72
|
-
return this._key;
|
|
79
|
+
var Attribute = _classThis = class extends _classSuper {
|
|
80
|
+
get keySize() { return __classPrivateFieldGet(this, _Attribute_keySize_accessor_storage, "f"); }
|
|
81
|
+
set keySize(value) { __classPrivateFieldSet(this, _Attribute_keySize_accessor_storage, value, "f"); }
|
|
82
|
+
get valueSize() { return __classPrivateFieldGet(this, _Attribute_valueSize_accessor_storage, "f"); }
|
|
83
|
+
set valueSize(value) { __classPrivateFieldSet(this, _Attribute_valueSize_accessor_storage, value, "f"); }
|
|
84
|
+
get name() {
|
|
85
|
+
return decodeUTF8(this.subarray(8, 8 + this.keySize));
|
|
73
86
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Note that this does not handle moving the data.
|
|
89
|
+
* Changing the name after setting the value is undefined behavior and will lead to corruption.
|
|
90
|
+
* This should only be used when creating a new attribute.
|
|
91
|
+
*/
|
|
92
|
+
set name(value) {
|
|
93
|
+
const buf = encodeUTF8(value);
|
|
94
|
+
if (8 + buf.length + this.valueSize > maxDynamicData)
|
|
95
|
+
throw withErrno('EOVERFLOW');
|
|
96
|
+
this.set(buf, 8);
|
|
97
|
+
this.keySize = buf.length;
|
|
77
98
|
}
|
|
78
99
|
get value() {
|
|
79
|
-
return this.
|
|
100
|
+
return this.subarray(8 + this.keySize, this.size);
|
|
80
101
|
}
|
|
81
102
|
set value(value) {
|
|
82
|
-
this.
|
|
103
|
+
if (8 + this.keySize + value.length > maxDynamicData)
|
|
104
|
+
throw withErrno('EOVERFLOW');
|
|
83
105
|
this.valueSize = value.length;
|
|
106
|
+
this.set(value, 8 + this.keySize);
|
|
84
107
|
}
|
|
85
|
-
|
|
86
|
-
this.keySize
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
__runInitializers(this,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (value)
|
|
94
|
-
this.value = value;
|
|
108
|
+
get size() {
|
|
109
|
+
return 8 + this.keySize + this.valueSize;
|
|
110
|
+
}
|
|
111
|
+
constructor() {
|
|
112
|
+
super(...arguments);
|
|
113
|
+
_Attribute_keySize_accessor_storage.set(this, __runInitializers(this, _keySize_initializers, void 0));
|
|
114
|
+
_Attribute_valueSize_accessor_storage.set(this, (__runInitializers(this, _keySize_extraInitializers), __runInitializers(this, _valueSize_initializers, void 0)));
|
|
115
|
+
__runInitializers(this, _valueSize_extraInitializers);
|
|
95
116
|
}
|
|
96
117
|
};
|
|
118
|
+
_Attribute_keySize_accessor_storage = new WeakMap();
|
|
119
|
+
_Attribute_valueSize_accessor_storage = new WeakMap();
|
|
97
120
|
__setFunctionName(_classThis, "Attribute");
|
|
98
121
|
(() => {
|
|
99
|
-
|
|
122
|
+
var _a;
|
|
123
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
100
124
|
_keySize_decorators = [(_a = t).uint32.bind(_a)];
|
|
101
125
|
_valueSize_decorators = [(_b = t).uint32.bind(_b)];
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
__esDecorate(null, null, _keySize_decorators, { kind: "field", name: "keySize", static: false, private: false, access: { has: obj => "keySize" in obj, get: obj => obj.keySize, set: (obj, value) => { obj.keySize = value; } }, metadata: _metadata }, _keySize_initializers, _keySize_extraInitializers);
|
|
105
|
-
__esDecorate(null, null, _valueSize_decorators, { kind: "field", name: "valueSize", static: false, private: false, access: { has: obj => "valueSize" in obj, get: obj => obj.valueSize, set: (obj, value) => { obj.valueSize = value; } }, metadata: _metadata }, _valueSize_initializers, _valueSize_extraInitializers);
|
|
106
|
-
__esDecorate(null, null, __key_decorators, { kind: "field", name: "_key", static: false, private: false, access: { has: obj => "_key" in obj, get: obj => obj._key, set: (obj, value) => { obj._key = value; } }, metadata: _metadata }, __key_initializers, __key_extraInitializers);
|
|
107
|
-
__esDecorate(null, null, __value_decorators, { kind: "field", name: "_value", static: false, private: false, access: { has: obj => "_value" in obj, get: obj => obj._value, set: (obj, value) => { obj._value = value; } }, metadata: _metadata }, __value_initializers, __value_extraInitializers);
|
|
126
|
+
__esDecorate(_classThis, null, _keySize_decorators, { kind: "accessor", name: "keySize", static: false, private: false, access: { has: obj => "keySize" in obj, get: obj => obj.keySize, set: (obj, value) => { obj.keySize = value; } }, metadata: _metadata }, _keySize_initializers, _keySize_extraInitializers);
|
|
127
|
+
__esDecorate(_classThis, null, _valueSize_decorators, { kind: "accessor", name: "valueSize", static: false, private: false, access: { has: obj => "valueSize" in obj, get: obj => obj.valueSize, set: (obj, value) => { obj.valueSize = value; } }, metadata: _metadata }, _valueSize_initializers, _valueSize_extraInitializers);
|
|
108
128
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
109
129
|
Attribute = _classThis = _classDescriptor.value;
|
|
110
130
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
@@ -118,63 +138,127 @@ let Attribute = (() => {
|
|
|
118
138
|
* @internal
|
|
119
139
|
*/
|
|
120
140
|
let Attributes = (() => {
|
|
141
|
+
var _Attributes_size_accessor_storage;
|
|
121
142
|
var _a;
|
|
122
|
-
let _classDecorators = [struct()];
|
|
143
|
+
let _classDecorators = [struct(packed)];
|
|
123
144
|
let _classDescriptor;
|
|
124
145
|
let _classExtraInitializers = [];
|
|
125
146
|
let _classThis;
|
|
147
|
+
let _classSuper = BufferView;
|
|
126
148
|
let _size_decorators;
|
|
127
149
|
let _size_initializers = [];
|
|
128
150
|
let _size_extraInitializers = [];
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
151
|
+
var Attributes = _classThis = class extends _classSuper {
|
|
152
|
+
get size() { return __classPrivateFieldGet(this, _Attributes_size_accessor_storage, "f"); }
|
|
153
|
+
set size(value) { __classPrivateFieldSet(this, _Attributes_size_accessor_storage, value, "f"); }
|
|
154
|
+
get byteSize() {
|
|
155
|
+
let offset = this.byteOffset + sizeof(this);
|
|
156
|
+
for (let i = 0; i < this.size; i++) {
|
|
157
|
+
const entry = new Attribute(this.buffer, offset);
|
|
158
|
+
offset += entry.size;
|
|
159
|
+
}
|
|
160
|
+
return offset;
|
|
161
|
+
}
|
|
133
162
|
has(name) {
|
|
134
|
-
|
|
163
|
+
let offset = this.byteOffset + sizeof(this);
|
|
164
|
+
for (let i = 0; i < this.size; i++) {
|
|
165
|
+
const entry = new Attribute(this.buffer, offset);
|
|
166
|
+
if (entry.name == name)
|
|
167
|
+
return true;
|
|
168
|
+
offset += entry.size;
|
|
169
|
+
}
|
|
170
|
+
return false;
|
|
135
171
|
}
|
|
136
172
|
get(name) {
|
|
137
|
-
|
|
173
|
+
let offset = this.byteOffset + sizeof(this);
|
|
174
|
+
for (let i = 0; i < this.size; i++) {
|
|
175
|
+
const entry = new Attribute(this.buffer, offset);
|
|
176
|
+
if (entry.name == name)
|
|
177
|
+
return entry.value;
|
|
178
|
+
offset += entry.size;
|
|
179
|
+
}
|
|
138
180
|
}
|
|
139
181
|
set(name, value) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
182
|
+
let offset = this.byteOffset + sizeof(this);
|
|
183
|
+
let remove;
|
|
184
|
+
for (let i = 0; i < this.size; i++) {
|
|
185
|
+
const entry = new Attribute(this.buffer, offset);
|
|
186
|
+
if (entry.name == name)
|
|
187
|
+
remove = [offset, entry.size];
|
|
188
|
+
offset += entry.size;
|
|
189
|
+
}
|
|
190
|
+
const buf = new Uint8Array(this.buffer);
|
|
191
|
+
if (remove) {
|
|
192
|
+
const [start, size] = remove;
|
|
193
|
+
offset -= size;
|
|
194
|
+
buf.copyWithin(start, start + size, offset + size);
|
|
195
|
+
buf.fill(0, offset, offset + size);
|
|
196
|
+
this.size--;
|
|
144
197
|
}
|
|
145
|
-
|
|
198
|
+
const attr = new Attribute(this.buffer, offset);
|
|
199
|
+
attr.name = name;
|
|
200
|
+
attr.value = value;
|
|
146
201
|
this.size++;
|
|
147
202
|
}
|
|
148
203
|
remove(name) {
|
|
149
|
-
|
|
150
|
-
|
|
204
|
+
let offset = this.byteOffset + sizeof(this);
|
|
205
|
+
let remove;
|
|
206
|
+
for (let i = 0; i < this.size; i++) {
|
|
207
|
+
const entry = new Attribute(this.buffer, offset);
|
|
208
|
+
if (entry.name == name)
|
|
209
|
+
remove = [offset, entry.size];
|
|
210
|
+
offset += entry.size;
|
|
211
|
+
}
|
|
212
|
+
if (!remove)
|
|
151
213
|
return false;
|
|
152
|
-
|
|
214
|
+
const [start, size] = remove;
|
|
215
|
+
const buf = new Uint8Array(this.buffer);
|
|
216
|
+
buf.copyWithin(start, start + size, offset);
|
|
217
|
+
buf.fill(0, offset - size, offset);
|
|
153
218
|
this.size--;
|
|
154
219
|
return true;
|
|
155
220
|
}
|
|
156
|
-
|
|
157
|
-
|
|
221
|
+
copyFrom(other) {
|
|
222
|
+
const { byteSize } = other;
|
|
223
|
+
new Uint8Array(this.buffer, this.byteOffset, byteSize).set(new Uint8Array(other.buffer, other.byteOffset, byteSize));
|
|
158
224
|
}
|
|
159
|
-
|
|
160
|
-
|
|
225
|
+
*keys() {
|
|
226
|
+
let offset = this.byteOffset + sizeof(this);
|
|
227
|
+
for (let i = 0; i < this.size; i++) {
|
|
228
|
+
const entry = new Attribute(this.buffer, offset);
|
|
229
|
+
yield entry.name;
|
|
230
|
+
offset += entry.size;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
*values() {
|
|
234
|
+
let offset = this.byteOffset + sizeof(this);
|
|
235
|
+
for (let i = 0; i < this.size; i++) {
|
|
236
|
+
const entry = new Attribute(this.buffer, offset);
|
|
237
|
+
yield entry.value;
|
|
238
|
+
offset += entry.size;
|
|
239
|
+
}
|
|
161
240
|
}
|
|
162
|
-
entries() {
|
|
163
|
-
|
|
241
|
+
*entries() {
|
|
242
|
+
let offset = this.byteOffset + sizeof(this);
|
|
243
|
+
for (let i = 0; i < this.size; i++) {
|
|
244
|
+
const entry = new Attribute(this.buffer, offset);
|
|
245
|
+
yield [entry.name, entry.value];
|
|
246
|
+
offset += entry.size;
|
|
247
|
+
}
|
|
164
248
|
}
|
|
165
249
|
constructor() {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
__runInitializers(this,
|
|
250
|
+
super(...arguments);
|
|
251
|
+
_Attributes_size_accessor_storage.set(this, __runInitializers(this, _size_initializers, void 0));
|
|
252
|
+
__runInitializers(this, _size_extraInitializers);
|
|
169
253
|
}
|
|
170
254
|
};
|
|
255
|
+
_Attributes_size_accessor_storage = new WeakMap();
|
|
171
256
|
__setFunctionName(_classThis, "Attributes");
|
|
172
257
|
(() => {
|
|
173
|
-
|
|
258
|
+
var _a;
|
|
259
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
174
260
|
_size_decorators = [(_a = t).uint32.bind(_a)];
|
|
175
|
-
|
|
176
|
-
__esDecorate(null, null, _size_decorators, { kind: "field", name: "size", static: false, private: false, access: { has: obj => "size" in obj, get: obj => obj.size, set: (obj, value) => { obj.size = value; } }, metadata: _metadata }, _size_initializers, _size_extraInitializers);
|
|
177
|
-
__esDecorate(null, null, _data_decorators, { kind: "field", name: "data", static: false, private: false, access: { has: obj => "data" in obj, get: obj => obj.data, set: (obj, value) => { obj.data = value; } }, metadata: _metadata }, _data_initializers, _data_extraInitializers);
|
|
261
|
+
__esDecorate(_classThis, null, _size_decorators, { kind: "accessor", name: "size", static: false, private: false, access: { has: obj => "size" in obj, get: obj => obj.size, set: (obj, value) => { obj.size = value; } }, metadata: _metadata }, _size_initializers, _size_extraInitializers);
|
|
178
262
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
179
263
|
Attributes = _classThis = _classDescriptor.value;
|
|
180
264
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
@@ -206,79 +290,54 @@ export const _inode_fields = [
|
|
|
206
290
|
* 1. 58 bytes. The first member was called `ino` but used as the ID for data.
|
|
207
291
|
* 2. 66 bytes. Renamed the first member from `ino` to `data` and added a separate `ino` field
|
|
208
292
|
* 3. 72 bytes. Changed the ID fields from 64 to 32 bits and added `flags`.
|
|
209
|
-
* 4.
|
|
293
|
+
* 4. >= 128 bytes. Added extended attributes.
|
|
294
|
+
* 5. (current) 4 KiB. Changed flags
|
|
210
295
|
* @internal @hidden
|
|
211
296
|
*/
|
|
212
|
-
export const _inode_version =
|
|
297
|
+
export const _inode_version = 5;
|
|
213
298
|
/**
|
|
214
|
-
* Inode flags
|
|
215
|
-
* @see `
|
|
299
|
+
* Inode flags
|
|
300
|
+
* @see `S_*` in `include/linux/fs.h` (around L2325)
|
|
216
301
|
* @experimental
|
|
217
302
|
*/
|
|
218
303
|
export var InodeFlags;
|
|
219
304
|
(function (InodeFlags) {
|
|
220
|
-
/**
|
|
221
|
-
InodeFlags[InodeFlags["
|
|
222
|
-
/**
|
|
223
|
-
InodeFlags[InodeFlags["
|
|
224
|
-
/**
|
|
225
|
-
InodeFlags[InodeFlags["
|
|
226
|
-
/** Synchronous updates */
|
|
227
|
-
InodeFlags[InodeFlags["Sync"] = 8] = "Sync";
|
|
305
|
+
/** Writes are synced at once */
|
|
306
|
+
InodeFlags[InodeFlags["Sync"] = 1] = "Sync";
|
|
307
|
+
/** Do not update access times */
|
|
308
|
+
InodeFlags[InodeFlags["NoAtime"] = 2] = "NoAtime";
|
|
309
|
+
/** Append-only file */
|
|
310
|
+
InodeFlags[InodeFlags["Append"] = 4] = "Append";
|
|
228
311
|
/** Immutable file */
|
|
229
|
-
InodeFlags[InodeFlags["Immutable"] =
|
|
230
|
-
/**
|
|
231
|
-
InodeFlags[InodeFlags["
|
|
232
|
-
/**
|
|
233
|
-
InodeFlags[InodeFlags["
|
|
234
|
-
/**
|
|
235
|
-
InodeFlags[InodeFlags["
|
|
236
|
-
|
|
237
|
-
InodeFlags[InodeFlags["
|
|
238
|
-
/**
|
|
239
|
-
InodeFlags[InodeFlags["
|
|
240
|
-
/**
|
|
241
|
-
InodeFlags[InodeFlags["
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
InodeFlags[InodeFlags["
|
|
250
|
-
/**
|
|
251
|
-
InodeFlags[InodeFlags["
|
|
252
|
-
/**
|
|
253
|
-
InodeFlags[InodeFlags["
|
|
254
|
-
/** file
|
|
255
|
-
InodeFlags[InodeFlags["
|
|
256
|
-
/**
|
|
257
|
-
InodeFlags[InodeFlags["
|
|
258
|
-
/** Top of directory hierarchies*/
|
|
259
|
-
InodeFlags[InodeFlags["TopDir"] = 131072] = "TopDir";
|
|
260
|
-
/** Reserved for ext4 */
|
|
261
|
-
InodeFlags[InodeFlags["HugeFile"] = 262144] = "HugeFile";
|
|
262
|
-
/** Extents */
|
|
263
|
-
InodeFlags[InodeFlags["Extent"] = 524288] = "Extent";
|
|
264
|
-
/** Verity protected inode */
|
|
265
|
-
InodeFlags[InodeFlags["Verity"] = 1048576] = "Verity";
|
|
266
|
-
/** Inode used for large EA */
|
|
267
|
-
InodeFlags[InodeFlags["EaInode"] = 2097152] = "EaInode";
|
|
268
|
-
/** Reserved for ext4 */
|
|
269
|
-
InodeFlags[InodeFlags["EofBlocks"] = 4194304] = "EofBlocks";
|
|
270
|
-
/** Do not cow file */
|
|
271
|
-
InodeFlags[InodeFlags["NoCow"] = 8388608] = "NoCow";
|
|
272
|
-
/** Inode is DAX */
|
|
273
|
-
InodeFlags[InodeFlags["Dax"] = 33554432] = "Dax";
|
|
274
|
-
/** Reserved for ext4 */
|
|
275
|
-
InodeFlags[InodeFlags["InlineData"] = 268435456] = "InlineData";
|
|
276
|
-
/** Create with parents projid */
|
|
277
|
-
InodeFlags[InodeFlags["ProjInherit"] = 536870912] = "ProjInherit";
|
|
278
|
-
/** Folder is case insensitive */
|
|
279
|
-
InodeFlags[InodeFlags["CaseFold"] = 1073741824] = "CaseFold";
|
|
280
|
-
/** reserved for ext2 lib */
|
|
281
|
-
InodeFlags[InodeFlags["Reserved"] = 2147483648] = "Reserved";
|
|
312
|
+
InodeFlags[InodeFlags["Immutable"] = 8] = "Immutable";
|
|
313
|
+
/** removed, but still open directory */
|
|
314
|
+
InodeFlags[InodeFlags["Dead"] = 16] = "Dead";
|
|
315
|
+
/** Inode is not counted to quota */
|
|
316
|
+
InodeFlags[InodeFlags["NoQuota"] = 32] = "NoQuota";
|
|
317
|
+
/** Directory modifications are synchronous */
|
|
318
|
+
InodeFlags[InodeFlags["Dirsync"] = 64] = "Dirsync";
|
|
319
|
+
/** Do not update file c/mtime */
|
|
320
|
+
InodeFlags[InodeFlags["NoCMtime"] = 128] = "NoCMtime";
|
|
321
|
+
/** Do not truncate: swapon got its bmaps */
|
|
322
|
+
InodeFlags[InodeFlags["SwapFile"] = 256] = "SwapFile";
|
|
323
|
+
/** Inode is fs-internal */
|
|
324
|
+
InodeFlags[InodeFlags["Private"] = 512] = "Private";
|
|
325
|
+
/** Inode has an associated IMA struct */
|
|
326
|
+
InodeFlags[InodeFlags["IMA"] = 1024] = "IMA";
|
|
327
|
+
/** Automount/referral quasi-directory */
|
|
328
|
+
InodeFlags[InodeFlags["AutoMount"] = 2048] = "AutoMount";
|
|
329
|
+
/** no suid or xattr security attributes */
|
|
330
|
+
InodeFlags[InodeFlags["NoSec"] = 4096] = "NoSec";
|
|
331
|
+
/** Direct Access, avoiding the page cache */
|
|
332
|
+
InodeFlags[InodeFlags["DAX"] = 8192] = "DAX";
|
|
333
|
+
/** Encrypted file (using fs/crypto/) */
|
|
334
|
+
InodeFlags[InodeFlags["Encrypted"] = 16384] = "Encrypted";
|
|
335
|
+
/** Casefolded file */
|
|
336
|
+
InodeFlags[InodeFlags["CaseFold"] = 32768] = "CaseFold";
|
|
337
|
+
/** Verity file (using fs/verity/) */
|
|
338
|
+
InodeFlags[InodeFlags["Verity"] = 65536] = "Verity";
|
|
339
|
+
/** File is in use by the kernel (eg. fs/cachefiles) */
|
|
340
|
+
InodeFlags[InodeFlags["KernelFile"] = 131072] = "KernelFile";
|
|
282
341
|
})(InodeFlags || (InodeFlags = {}));
|
|
283
342
|
/** User visible flags */
|
|
284
343
|
export const userVisibleFlags = 0x0003dfff;
|
|
@@ -290,11 +349,13 @@ export const userModifiableFlags = 0x000380ff;
|
|
|
290
349
|
* @internal
|
|
291
350
|
*/
|
|
292
351
|
let Inode = (() => {
|
|
352
|
+
var _Inode_data_accessor_storage, _Inode___data_old_accessor_storage, _Inode_size_accessor_storage, _Inode_mode_accessor_storage, _Inode_nlink_accessor_storage, _Inode_uid_accessor_storage, _Inode_gid_accessor_storage, _Inode_atimeMs_accessor_storage, _Inode_birthtimeMs_accessor_storage, _Inode_mtimeMs_accessor_storage, _Inode_ctimeMs_accessor_storage, _Inode_ino_accessor_storage, _Inode___ino_old_accessor_storage, _Inode_flags_accessor_storage, _Inode___after_flags_accessor_storage, _Inode_version_accessor_storage, _Inode___padding_accessor_storage, _Inode_attributes_accessor_storage, _Inode___data_accessor_storage;
|
|
293
353
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
294
|
-
let _classDecorators = [struct()];
|
|
354
|
+
let _classDecorators = [struct(packed)];
|
|
295
355
|
let _classDescriptor;
|
|
296
356
|
let _classExtraInitializers = [];
|
|
297
357
|
let _classThis;
|
|
358
|
+
let _classSuper = BufferView;
|
|
298
359
|
let _data_decorators;
|
|
299
360
|
let _data_initializers = [];
|
|
300
361
|
let _data_extraInitializers = [];
|
|
@@ -349,51 +410,109 @@ let Inode = (() => {
|
|
|
349
410
|
let _attributes_decorators;
|
|
350
411
|
let _attributes_initializers = [];
|
|
351
412
|
let _attributes_extraInitializers = [];
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
this
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
this
|
|
371
|
-
this
|
|
372
|
-
|
|
373
|
-
this
|
|
374
|
-
this
|
|
375
|
-
|
|
376
|
-
this
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
413
|
+
let ___data_decorators;
|
|
414
|
+
let ___data_initializers = [];
|
|
415
|
+
let ___data_extraInitializers = [];
|
|
416
|
+
var Inode = _classThis = class extends _classSuper {
|
|
417
|
+
constructor(...args) {
|
|
418
|
+
let data = {};
|
|
419
|
+
if (typeof args[0] === 'object' && args[0] !== null && !ArrayBuffer.isView(args[0])) {
|
|
420
|
+
data = args[0];
|
|
421
|
+
args = [sizeof(Inode)];
|
|
422
|
+
}
|
|
423
|
+
super(...args);
|
|
424
|
+
_Inode_data_accessor_storage.set(this, __runInitializers(this, _data_initializers, void 0));
|
|
425
|
+
_Inode___data_old_accessor_storage.set(this, (__runInitializers(this, _data_extraInitializers), __runInitializers(this, ___data_old_initializers, void 0)));
|
|
426
|
+
_Inode_size_accessor_storage.set(this, (__runInitializers(this, ___data_old_extraInitializers), __runInitializers(this, _size_initializers, void 0)));
|
|
427
|
+
_Inode_mode_accessor_storage.set(this, (__runInitializers(this, _size_extraInitializers), __runInitializers(this, _mode_initializers, void 0)));
|
|
428
|
+
_Inode_nlink_accessor_storage.set(this, (__runInitializers(this, _mode_extraInitializers), __runInitializers(this, _nlink_initializers, void 0)));
|
|
429
|
+
_Inode_uid_accessor_storage.set(this, (__runInitializers(this, _nlink_extraInitializers), __runInitializers(this, _uid_initializers, void 0)));
|
|
430
|
+
_Inode_gid_accessor_storage.set(this, (__runInitializers(this, _uid_extraInitializers), __runInitializers(this, _gid_initializers, void 0)));
|
|
431
|
+
_Inode_atimeMs_accessor_storage.set(this, (__runInitializers(this, _gid_extraInitializers), __runInitializers(this, _atimeMs_initializers, void 0)));
|
|
432
|
+
_Inode_birthtimeMs_accessor_storage.set(this, (__runInitializers(this, _atimeMs_extraInitializers), __runInitializers(this, _birthtimeMs_initializers, void 0)));
|
|
433
|
+
_Inode_mtimeMs_accessor_storage.set(this, (__runInitializers(this, _birthtimeMs_extraInitializers), __runInitializers(this, _mtimeMs_initializers, void 0)));
|
|
434
|
+
_Inode_ctimeMs_accessor_storage.set(this, (__runInitializers(this, _mtimeMs_extraInitializers), __runInitializers(this, _ctimeMs_initializers, void 0)));
|
|
435
|
+
_Inode_ino_accessor_storage.set(this, (__runInitializers(this, _ctimeMs_extraInitializers), __runInitializers(this, _ino_initializers, void 0)));
|
|
436
|
+
_Inode___ino_old_accessor_storage.set(this, (__runInitializers(this, _ino_extraInitializers), __runInitializers(this, ___ino_old_initializers, void 0)));
|
|
437
|
+
_Inode_flags_accessor_storage.set(this, (__runInitializers(this, ___ino_old_extraInitializers), __runInitializers(this, _flags_initializers, void 0)));
|
|
438
|
+
_Inode___after_flags_accessor_storage.set(this, (__runInitializers(this, _flags_extraInitializers), __runInitializers(this, ___after_flags_initializers, void 0)));
|
|
439
|
+
_Inode_version_accessor_storage.set(this, (__runInitializers(this, ___after_flags_extraInitializers), __runInitializers(this, _version_initializers, void 0)));
|
|
440
|
+
_Inode___padding_accessor_storage.set(this, (__runInitializers(this, _version_extraInitializers), __runInitializers(this, ___padding_initializers, void 0)));
|
|
441
|
+
_Inode_attributes_accessor_storage.set(this, (__runInitializers(this, ___padding_extraInitializers), __runInitializers(this, _attributes_initializers, void 0)));
|
|
442
|
+
_Inode___data_accessor_storage.set(this, (__runInitializers(this, _attributes_extraInitializers), __runInitializers(this, ___data_initializers, void 0)));
|
|
443
|
+
__runInitializers(this, ___data_extraInitializers);
|
|
444
|
+
if (this.byteLength < sizeof(Inode)) {
|
|
445
|
+
throw crit(withErrno('EIO', `Buffer is too small to create an inode (${this.byteLength} bytes)`));
|
|
446
|
+
}
|
|
447
|
+
Object.assign(this, data);
|
|
448
|
+
this.atimeMs || (this.atimeMs = Date.now());
|
|
449
|
+
this.mtimeMs || (this.mtimeMs = Date.now());
|
|
450
|
+
this.ctimeMs || (this.ctimeMs = Date.now());
|
|
451
|
+
this.birthtimeMs || (this.birthtimeMs = Date.now());
|
|
452
|
+
if (this.ino && !this.nlink) {
|
|
453
|
+
warn(`Inode ${this.ino} has an nlink of 0`);
|
|
392
454
|
}
|
|
393
|
-
if (data.byteLength < sizeof(Inode))
|
|
394
|
-
throw crit(new ErrnoError(Errno.EIO, 'Buffer is too small to create an inode'));
|
|
395
|
-
deserialize(this, data);
|
|
396
455
|
}
|
|
456
|
+
get data() { return __classPrivateFieldGet(this, _Inode_data_accessor_storage, "f"); }
|
|
457
|
+
set data(value) { __classPrivateFieldSet(this, _Inode_data_accessor_storage, value, "f"); }
|
|
458
|
+
/** For future use */
|
|
459
|
+
get __data_old() { return __classPrivateFieldGet(this, _Inode___data_old_accessor_storage, "f"); }
|
|
460
|
+
set __data_old(value) { __classPrivateFieldSet(this, _Inode___data_old_accessor_storage, value, "f"); }
|
|
461
|
+
get size() { return __classPrivateFieldGet(this, _Inode_size_accessor_storage, "f"); }
|
|
462
|
+
set size(value) { __classPrivateFieldSet(this, _Inode_size_accessor_storage, value, "f"); }
|
|
463
|
+
get mode() { return __classPrivateFieldGet(this, _Inode_mode_accessor_storage, "f"); }
|
|
464
|
+
set mode(value) { __classPrivateFieldSet(this, _Inode_mode_accessor_storage, value, "f"); }
|
|
465
|
+
get nlink() { return __classPrivateFieldGet(this, _Inode_nlink_accessor_storage, "f"); }
|
|
466
|
+
set nlink(value) { __classPrivateFieldSet(this, _Inode_nlink_accessor_storage, value, "f"); }
|
|
467
|
+
get uid() { return __classPrivateFieldGet(this, _Inode_uid_accessor_storage, "f"); }
|
|
468
|
+
set uid(value) { __classPrivateFieldSet(this, _Inode_uid_accessor_storage, value, "f"); }
|
|
469
|
+
get gid() { return __classPrivateFieldGet(this, _Inode_gid_accessor_storage, "f"); }
|
|
470
|
+
set gid(value) { __classPrivateFieldSet(this, _Inode_gid_accessor_storage, value, "f"); }
|
|
471
|
+
get atimeMs() { return __classPrivateFieldGet(this, _Inode_atimeMs_accessor_storage, "f"); }
|
|
472
|
+
set atimeMs(value) { __classPrivateFieldSet(this, _Inode_atimeMs_accessor_storage, value, "f"); }
|
|
473
|
+
get birthtimeMs() { return __classPrivateFieldGet(this, _Inode_birthtimeMs_accessor_storage, "f"); }
|
|
474
|
+
set birthtimeMs(value) { __classPrivateFieldSet(this, _Inode_birthtimeMs_accessor_storage, value, "f"); }
|
|
475
|
+
get mtimeMs() { return __classPrivateFieldGet(this, _Inode_mtimeMs_accessor_storage, "f"); }
|
|
476
|
+
set mtimeMs(value) { __classPrivateFieldSet(this, _Inode_mtimeMs_accessor_storage, value, "f"); }
|
|
477
|
+
/**
|
|
478
|
+
* The time the inode was changed.
|
|
479
|
+
*
|
|
480
|
+
* This is automatically updated whenever changed are made using `update()`.
|
|
481
|
+
*/
|
|
482
|
+
get ctimeMs() { return __classPrivateFieldGet(this, _Inode_ctimeMs_accessor_storage, "f"); }
|
|
483
|
+
set ctimeMs(value) { __classPrivateFieldSet(this, _Inode_ctimeMs_accessor_storage, value, "f"); }
|
|
484
|
+
get ino() { return __classPrivateFieldGet(this, _Inode_ino_accessor_storage, "f"); }
|
|
485
|
+
set ino(value) { __classPrivateFieldSet(this, _Inode_ino_accessor_storage, value, "f"); }
|
|
486
|
+
/** For future use */
|
|
487
|
+
get __ino_old() { return __classPrivateFieldGet(this, _Inode___ino_old_accessor_storage, "f"); }
|
|
488
|
+
set __ino_old(value) { __classPrivateFieldSet(this, _Inode___ino_old_accessor_storage, value, "f"); }
|
|
489
|
+
get flags() { return __classPrivateFieldGet(this, _Inode_flags_accessor_storage, "f"); }
|
|
490
|
+
set flags(value) { __classPrivateFieldSet(this, _Inode_flags_accessor_storage, value, "f"); }
|
|
491
|
+
/** For future use */
|
|
492
|
+
get __after_flags() { return __classPrivateFieldGet(this, _Inode___after_flags_accessor_storage, "f"); }
|
|
493
|
+
set __after_flags(value) { __classPrivateFieldSet(this, _Inode___after_flags_accessor_storage, value, "f"); }
|
|
494
|
+
/**
|
|
495
|
+
* The "version" of the inode/data.
|
|
496
|
+
* Unrelated to the inode format!
|
|
497
|
+
*/
|
|
498
|
+
get version() { return __classPrivateFieldGet(this, _Inode_version_accessor_storage, "f"); }
|
|
499
|
+
set version(value) { __classPrivateFieldSet(this, _Inode_version_accessor_storage, value, "f"); }
|
|
500
|
+
/**
|
|
501
|
+
* Padding up to 128 bytes.
|
|
502
|
+
* This ensures there is enough room for expansion without breaking the ABI.
|
|
503
|
+
* @internal
|
|
504
|
+
*/
|
|
505
|
+
get __padding() { return __classPrivateFieldGet(this, _Inode___padding_accessor_storage, "f"); }
|
|
506
|
+
set __padding(value) { __classPrivateFieldSet(this, _Inode___padding_accessor_storage, value, "f"); }
|
|
507
|
+
get attributes() { return __classPrivateFieldGet(this, _Inode_attributes_accessor_storage, "f"); }
|
|
508
|
+
set attributes(value) { __classPrivateFieldSet(this, _Inode_attributes_accessor_storage, value, "f"); }
|
|
509
|
+
/**
|
|
510
|
+
* Since the attribute data uses dynamic arrays,
|
|
511
|
+
* it is necessary to add this so attributes can be added.
|
|
512
|
+
* @internal @hidden
|
|
513
|
+
*/
|
|
514
|
+
get __data() { return __classPrivateFieldGet(this, _Inode___data_accessor_storage, "f"); }
|
|
515
|
+
set __data(value) { __classPrivateFieldSet(this, _Inode___data_accessor_storage, value, "f"); }
|
|
397
516
|
toString() {
|
|
398
517
|
return `<Inode ${this.ino}>`;
|
|
399
518
|
}
|
|
@@ -437,7 +556,7 @@ let Inode = (() => {
|
|
|
437
556
|
hasChanged = true;
|
|
438
557
|
}
|
|
439
558
|
if (data.attributes) {
|
|
440
|
-
this.attributes
|
|
559
|
+
this.attributes.copyFrom(data.attributes);
|
|
441
560
|
hasChanged = true;
|
|
442
561
|
}
|
|
443
562
|
if (hasChanged)
|
|
@@ -445,9 +564,29 @@ let Inode = (() => {
|
|
|
445
564
|
return hasChanged;
|
|
446
565
|
}
|
|
447
566
|
};
|
|
567
|
+
_Inode_data_accessor_storage = new WeakMap();
|
|
568
|
+
_Inode___data_old_accessor_storage = new WeakMap();
|
|
569
|
+
_Inode_size_accessor_storage = new WeakMap();
|
|
570
|
+
_Inode_mode_accessor_storage = new WeakMap();
|
|
571
|
+
_Inode_nlink_accessor_storage = new WeakMap();
|
|
572
|
+
_Inode_uid_accessor_storage = new WeakMap();
|
|
573
|
+
_Inode_gid_accessor_storage = new WeakMap();
|
|
574
|
+
_Inode_atimeMs_accessor_storage = new WeakMap();
|
|
575
|
+
_Inode_birthtimeMs_accessor_storage = new WeakMap();
|
|
576
|
+
_Inode_mtimeMs_accessor_storage = new WeakMap();
|
|
577
|
+
_Inode_ctimeMs_accessor_storage = new WeakMap();
|
|
578
|
+
_Inode_ino_accessor_storage = new WeakMap();
|
|
579
|
+
_Inode___ino_old_accessor_storage = new WeakMap();
|
|
580
|
+
_Inode_flags_accessor_storage = new WeakMap();
|
|
581
|
+
_Inode___after_flags_accessor_storage = new WeakMap();
|
|
582
|
+
_Inode_version_accessor_storage = new WeakMap();
|
|
583
|
+
_Inode___padding_accessor_storage = new WeakMap();
|
|
584
|
+
_Inode_attributes_accessor_storage = new WeakMap();
|
|
585
|
+
_Inode___data_accessor_storage = new WeakMap();
|
|
448
586
|
__setFunctionName(_classThis, "Inode");
|
|
449
587
|
(() => {
|
|
450
|
-
|
|
588
|
+
var _a;
|
|
589
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
451
590
|
_data_decorators = [(_a = t).uint32.bind(_a)];
|
|
452
591
|
___data_old_decorators = [(_b = t).uint32.bind(_b)];
|
|
453
592
|
_size_decorators = [(_c = t).uint32.bind(_c)];
|
|
@@ -465,25 +604,27 @@ let Inode = (() => {
|
|
|
465
604
|
___after_flags_decorators = [(_q = t).uint16.bind(_q)];
|
|
466
605
|
_version_decorators = [(_r = t).uint32.bind(_r)];
|
|
467
606
|
___padding_decorators = [t.uint8(48)];
|
|
468
|
-
_attributes_decorators = [
|
|
469
|
-
|
|
470
|
-
__esDecorate(
|
|
471
|
-
__esDecorate(
|
|
472
|
-
__esDecorate(
|
|
473
|
-
__esDecorate(
|
|
474
|
-
__esDecorate(
|
|
475
|
-
__esDecorate(
|
|
476
|
-
__esDecorate(
|
|
477
|
-
__esDecorate(
|
|
478
|
-
__esDecorate(
|
|
479
|
-
__esDecorate(
|
|
480
|
-
__esDecorate(
|
|
481
|
-
__esDecorate(
|
|
482
|
-
__esDecorate(
|
|
483
|
-
__esDecorate(
|
|
484
|
-
__esDecorate(
|
|
485
|
-
__esDecorate(
|
|
486
|
-
__esDecorate(
|
|
607
|
+
_attributes_decorators = [field(Attributes)];
|
|
608
|
+
___data_decorators = [t.uint8(maxDynamicData)];
|
|
609
|
+
__esDecorate(_classThis, null, _data_decorators, { kind: "accessor", name: "data", static: false, private: false, access: { has: obj => "data" in obj, get: obj => obj.data, set: (obj, value) => { obj.data = value; } }, metadata: _metadata }, _data_initializers, _data_extraInitializers);
|
|
610
|
+
__esDecorate(_classThis, null, ___data_old_decorators, { kind: "accessor", name: "__data_old", static: false, private: false, access: { has: obj => "__data_old" in obj, get: obj => obj.__data_old, set: (obj, value) => { obj.__data_old = value; } }, metadata: _metadata }, ___data_old_initializers, ___data_old_extraInitializers);
|
|
611
|
+
__esDecorate(_classThis, null, _size_decorators, { kind: "accessor", name: "size", static: false, private: false, access: { has: obj => "size" in obj, get: obj => obj.size, set: (obj, value) => { obj.size = value; } }, metadata: _metadata }, _size_initializers, _size_extraInitializers);
|
|
612
|
+
__esDecorate(_classThis, null, _mode_decorators, { kind: "accessor", name: "mode", static: false, private: false, access: { has: obj => "mode" in obj, get: obj => obj.mode, set: (obj, value) => { obj.mode = value; } }, metadata: _metadata }, _mode_initializers, _mode_extraInitializers);
|
|
613
|
+
__esDecorate(_classThis, null, _nlink_decorators, { kind: "accessor", name: "nlink", static: false, private: false, access: { has: obj => "nlink" in obj, get: obj => obj.nlink, set: (obj, value) => { obj.nlink = value; } }, metadata: _metadata }, _nlink_initializers, _nlink_extraInitializers);
|
|
614
|
+
__esDecorate(_classThis, null, _uid_decorators, { kind: "accessor", name: "uid", static: false, private: false, access: { has: obj => "uid" in obj, get: obj => obj.uid, set: (obj, value) => { obj.uid = value; } }, metadata: _metadata }, _uid_initializers, _uid_extraInitializers);
|
|
615
|
+
__esDecorate(_classThis, null, _gid_decorators, { kind: "accessor", name: "gid", static: false, private: false, access: { has: obj => "gid" in obj, get: obj => obj.gid, set: (obj, value) => { obj.gid = value; } }, metadata: _metadata }, _gid_initializers, _gid_extraInitializers);
|
|
616
|
+
__esDecorate(_classThis, null, _atimeMs_decorators, { kind: "accessor", name: "atimeMs", static: false, private: false, access: { has: obj => "atimeMs" in obj, get: obj => obj.atimeMs, set: (obj, value) => { obj.atimeMs = value; } }, metadata: _metadata }, _atimeMs_initializers, _atimeMs_extraInitializers);
|
|
617
|
+
__esDecorate(_classThis, null, _birthtimeMs_decorators, { kind: "accessor", name: "birthtimeMs", static: false, private: false, access: { has: obj => "birthtimeMs" in obj, get: obj => obj.birthtimeMs, set: (obj, value) => { obj.birthtimeMs = value; } }, metadata: _metadata }, _birthtimeMs_initializers, _birthtimeMs_extraInitializers);
|
|
618
|
+
__esDecorate(_classThis, null, _mtimeMs_decorators, { kind: "accessor", name: "mtimeMs", static: false, private: false, access: { has: obj => "mtimeMs" in obj, get: obj => obj.mtimeMs, set: (obj, value) => { obj.mtimeMs = value; } }, metadata: _metadata }, _mtimeMs_initializers, _mtimeMs_extraInitializers);
|
|
619
|
+
__esDecorate(_classThis, null, _ctimeMs_decorators, { kind: "accessor", name: "ctimeMs", static: false, private: false, access: { has: obj => "ctimeMs" in obj, get: obj => obj.ctimeMs, set: (obj, value) => { obj.ctimeMs = value; } }, metadata: _metadata }, _ctimeMs_initializers, _ctimeMs_extraInitializers);
|
|
620
|
+
__esDecorate(_classThis, null, _ino_decorators, { kind: "accessor", name: "ino", static: false, private: false, access: { has: obj => "ino" in obj, get: obj => obj.ino, set: (obj, value) => { obj.ino = value; } }, metadata: _metadata }, _ino_initializers, _ino_extraInitializers);
|
|
621
|
+
__esDecorate(_classThis, null, ___ino_old_decorators, { kind: "accessor", name: "__ino_old", static: false, private: false, access: { has: obj => "__ino_old" in obj, get: obj => obj.__ino_old, set: (obj, value) => { obj.__ino_old = value; } }, metadata: _metadata }, ___ino_old_initializers, ___ino_old_extraInitializers);
|
|
622
|
+
__esDecorate(_classThis, null, _flags_decorators, { kind: "accessor", name: "flags", static: false, private: false, access: { has: obj => "flags" in obj, get: obj => obj.flags, set: (obj, value) => { obj.flags = value; } }, metadata: _metadata }, _flags_initializers, _flags_extraInitializers);
|
|
623
|
+
__esDecorate(_classThis, null, ___after_flags_decorators, { kind: "accessor", name: "__after_flags", static: false, private: false, access: { has: obj => "__after_flags" in obj, get: obj => obj.__after_flags, set: (obj, value) => { obj.__after_flags = value; } }, metadata: _metadata }, ___after_flags_initializers, ___after_flags_extraInitializers);
|
|
624
|
+
__esDecorate(_classThis, null, _version_decorators, { kind: "accessor", name: "version", static: false, private: false, access: { has: obj => "version" in obj, get: obj => obj.version, set: (obj, value) => { obj.version = value; } }, metadata: _metadata }, _version_initializers, _version_extraInitializers);
|
|
625
|
+
__esDecorate(_classThis, null, ___padding_decorators, { kind: "accessor", name: "__padding", static: false, private: false, access: { has: obj => "__padding" in obj, get: obj => obj.__padding, set: (obj, value) => { obj.__padding = value; } }, metadata: _metadata }, ___padding_initializers, ___padding_extraInitializers);
|
|
626
|
+
__esDecorate(_classThis, null, _attributes_decorators, { kind: "accessor", name: "attributes", static: false, private: false, access: { has: obj => "attributes" in obj, get: obj => obj.attributes, set: (obj, value) => { obj.attributes = value; } }, metadata: _metadata }, _attributes_initializers, _attributes_extraInitializers);
|
|
627
|
+
__esDecorate(_classThis, null, ___data_decorators, { kind: "accessor", name: "__data", static: false, private: false, access: { has: obj => "__data" in obj, get: obj => obj.__data, set: (obj, value) => { obj.__data = value; } }, metadata: _metadata }, ___data_initializers, ___data_extraInitializers);
|
|
487
628
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
488
629
|
Inode = _classThis = _classDescriptor.value;
|
|
489
630
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|