zen-fs-config 0.5.49 → 0.5.50
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/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +51 -19
- package/dist/index.mjs +51 -19
- package/dist/zen-fs-config.js +51 -19
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -954,6 +954,12 @@ declare class ConfigRepo implements IConfigRepo {
|
|
|
954
954
|
}): Promise<SyncResult>;
|
|
955
955
|
peekNodeConfig<T = unknown>(nodeId: string, path: string): Promise<T>;
|
|
956
956
|
flush(): Promise<SyncResult[]>;
|
|
957
|
+
/**
|
|
958
|
+
* Write the tombstone record for `filePath` (new `.meta/tombstones` + legacy
|
|
959
|
+
* mirror for one release cycle). Records only metadata — it never creates
|
|
960
|
+
* the deleted file locally.
|
|
961
|
+
*/
|
|
962
|
+
private writeTombstoneFor;
|
|
957
963
|
/**
|
|
958
964
|
* Delete a file and write a tombstone so the deletion propagates
|
|
959
965
|
* to all backends instead of being treated as "missing file → re-create".
|
package/dist/index.d.ts
CHANGED
|
@@ -954,6 +954,12 @@ declare class ConfigRepo implements IConfigRepo {
|
|
|
954
954
|
}): Promise<SyncResult>;
|
|
955
955
|
peekNodeConfig<T = unknown>(nodeId: string, path: string): Promise<T>;
|
|
956
956
|
flush(): Promise<SyncResult[]>;
|
|
957
|
+
/**
|
|
958
|
+
* Write the tombstone record for `filePath` (new `.meta/tombstones` + legacy
|
|
959
|
+
* mirror for one release cycle). Records only metadata — it never creates
|
|
960
|
+
* the deleted file locally.
|
|
961
|
+
*/
|
|
962
|
+
private writeTombstoneFor;
|
|
957
963
|
/**
|
|
958
964
|
* Delete a file and write a tombstone so the deletion propagates
|
|
959
965
|
* to all backends instead of being treated as "missing file → re-create".
|
package/dist/index.js
CHANGED
|
@@ -1836,6 +1836,20 @@ async function collectFilesUnder(fs, dir, out = []) {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
return out;
|
|
1838
1838
|
}
|
|
1839
|
+
async function collectDirectoriesUnder(fs, dir, out = []) {
|
|
1840
|
+
out.push(dir);
|
|
1841
|
+
let entries;
|
|
1842
|
+
try {
|
|
1843
|
+
entries = await fs.readdir(dir);
|
|
1844
|
+
} catch {
|
|
1845
|
+
return out;
|
|
1846
|
+
}
|
|
1847
|
+
for (const entry of entries) {
|
|
1848
|
+
const child = dir === "/" ? `/${entry}` : `${dir}/${entry}`;
|
|
1849
|
+
if (await isDirectoryPath(fs, child)) await collectDirectoriesUnder(fs, child, out);
|
|
1850
|
+
}
|
|
1851
|
+
return out;
|
|
1852
|
+
}
|
|
1839
1853
|
async function removeDirectoryTree(fs, dir) {
|
|
1840
1854
|
let entries;
|
|
1841
1855
|
try {
|
|
@@ -2146,6 +2160,26 @@ var ConfigRepo = class {
|
|
|
2146
2160
|
// -----------------------------------------------------------------------
|
|
2147
2161
|
// Tombstone (Deletion Tracking)
|
|
2148
2162
|
// -----------------------------------------------------------------------
|
|
2163
|
+
/**
|
|
2164
|
+
* Write the tombstone record for `filePath` (new `.meta/tombstones` + legacy
|
|
2165
|
+
* mirror for one release cycle). Records only metadata — it never creates
|
|
2166
|
+
* the deleted file locally.
|
|
2167
|
+
*/
|
|
2168
|
+
async writeTombstoneFor(filePath) {
|
|
2169
|
+
const normalizedPath = filePath.startsWith("/") ? filePath : "/" + filePath;
|
|
2170
|
+
const tombstone = {
|
|
2171
|
+
path: normalizedPath,
|
|
2172
|
+
deletedAt: Date.now(),
|
|
2173
|
+
deletedBy: this.primaryBackendId,
|
|
2174
|
+
confirmedBy: [this.primaryBackendId]
|
|
2175
|
+
};
|
|
2176
|
+
const tombstoneBytes = new TextEncoder().encode(JSON.stringify(tombstone, null, 2));
|
|
2177
|
+
for (const dir of [TOMBSTONES_DIR, LEGACY_TOMBSTONES_DIR]) {
|
|
2178
|
+
const tombstonePath = tombstonePathFor(normalizedPath, dir);
|
|
2179
|
+
await this.ensureDir(tombstonePath);
|
|
2180
|
+
await this.cachedFS.writeFile(tombstonePath, tombstoneBytes);
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2149
2183
|
/**
|
|
2150
2184
|
* Delete a file and write a tombstone so the deletion propagates
|
|
2151
2185
|
* to all backends instead of being treated as "missing file → re-create".
|
|
@@ -2156,24 +2190,16 @@ var ConfigRepo = class {
|
|
|
2156
2190
|
if (await isDirectoryPath(this.cachedFS, normalizedPath)) {
|
|
2157
2191
|
const files = await collectFilesUnder(this.cachedFS, normalizedPath);
|
|
2158
2192
|
for (const file of files) await this.deleteFile(file);
|
|
2193
|
+
for (const dir of await collectDirectoriesUnder(this.cachedFS, normalizedPath)) {
|
|
2194
|
+
await this.writeTombstoneFor(dir === "/" ? "/.keep" : `${dir}/.keep`);
|
|
2195
|
+
}
|
|
2159
2196
|
await removeDirectoryTree(this.cachedFS, normalizedPath);
|
|
2160
2197
|
this.invalidateTombstoneCache();
|
|
2161
2198
|
this.schedulePostDeleteSync();
|
|
2162
2199
|
log2.log(`[ConfigRepo] deleteFile(directory): ${normalizedPath} (${files.length} file(s))`);
|
|
2163
2200
|
return;
|
|
2164
2201
|
}
|
|
2165
|
-
|
|
2166
|
-
path: normalizedPath,
|
|
2167
|
-
deletedAt: Date.now(),
|
|
2168
|
-
deletedBy: this.primaryBackendId,
|
|
2169
|
-
confirmedBy: [this.primaryBackendId]
|
|
2170
|
-
};
|
|
2171
|
-
const tombstoneBytes = new TextEncoder().encode(JSON.stringify(tombstone, null, 2));
|
|
2172
|
-
for (const dir of [TOMBSTONES_DIR, LEGACY_TOMBSTONES_DIR]) {
|
|
2173
|
-
const tombstonePath = tombstonePathFor(normalizedPath, dir);
|
|
2174
|
-
await this.ensureDir(tombstonePath);
|
|
2175
|
-
await this.cachedFS.writeFile(tombstonePath, tombstoneBytes);
|
|
2176
|
-
}
|
|
2202
|
+
await this.writeTombstoneFor(normalizedPath);
|
|
2177
2203
|
try {
|
|
2178
2204
|
await this.cachedFS.unlink(normalizedPath);
|
|
2179
2205
|
} catch {
|
|
@@ -3923,6 +3949,15 @@ var AppDataGroupImpl = class {
|
|
|
3923
3949
|
log2.warn(`[AppDataGroup:${this.groupId}] tombstone confirmations failed:`, err);
|
|
3924
3950
|
}
|
|
3925
3951
|
}
|
|
3952
|
+
/** Write a tombstone for `filePath`. Records metadata only — it never creates the file. */
|
|
3953
|
+
async writeTombstoneFor(filePath) {
|
|
3954
|
+
await this.tombstones.write({
|
|
3955
|
+
path: filePath.startsWith("/") ? filePath : `/${filePath}`,
|
|
3956
|
+
deletedAt: Date.now(),
|
|
3957
|
+
deletedBy: this.localBackendId,
|
|
3958
|
+
confirmedBy: [this.localBackendId]
|
|
3959
|
+
});
|
|
3960
|
+
}
|
|
3926
3961
|
/**
|
|
3927
3962
|
* Delete a data file with a tombstone in `.meta/tombstones/`.
|
|
3928
3963
|
* The tombstone is synced (`.meta/` is no longer excluded), so the deletion
|
|
@@ -3937,18 +3972,15 @@ var AppDataGroupImpl = class {
|
|
|
3937
3972
|
if (await isDirectoryPath(this.localFS, normalized)) {
|
|
3938
3973
|
const files = await collectFilesUnder(this.localFS, normalized);
|
|
3939
3974
|
for (const file of files) await this.deleteFile(file);
|
|
3975
|
+
for (const dir of await collectDirectoriesUnder(this.localFS, normalized)) {
|
|
3976
|
+
await this.writeTombstoneFor(dir === "/" ? "/.keep" : `${dir}/.keep`);
|
|
3977
|
+
}
|
|
3940
3978
|
await removeDirectoryTree(this.localFS, normalized);
|
|
3941
3979
|
this.schedulePostDeleteSync();
|
|
3942
3980
|
log2.log(`[AppDataGroup:${this.groupId}] deleteFile(directory): ${normalized} (${files.length} file(s))`);
|
|
3943
3981
|
return;
|
|
3944
3982
|
}
|
|
3945
|
-
|
|
3946
|
-
path: normalized,
|
|
3947
|
-
deletedAt: Date.now(),
|
|
3948
|
-
deletedBy: this.localBackendId,
|
|
3949
|
-
confirmedBy: [this.localBackendId]
|
|
3950
|
-
};
|
|
3951
|
-
await this.tombstones.write(tombstone);
|
|
3983
|
+
await this.writeTombstoneFor(normalized);
|
|
3952
3984
|
try {
|
|
3953
3985
|
await this.localFS.unlink(normalized);
|
|
3954
3986
|
} catch {
|
package/dist/index.mjs
CHANGED
|
@@ -1281,6 +1281,20 @@ async function collectFilesUnder(fs, dir, out = []) {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
return out;
|
|
1283
1283
|
}
|
|
1284
|
+
async function collectDirectoriesUnder(fs, dir, out = []) {
|
|
1285
|
+
out.push(dir);
|
|
1286
|
+
let entries;
|
|
1287
|
+
try {
|
|
1288
|
+
entries = await fs.readdir(dir);
|
|
1289
|
+
} catch {
|
|
1290
|
+
return out;
|
|
1291
|
+
}
|
|
1292
|
+
for (const entry of entries) {
|
|
1293
|
+
const child = dir === "/" ? `/${entry}` : `${dir}/${entry}`;
|
|
1294
|
+
if (await isDirectoryPath(fs, child)) await collectDirectoriesUnder(fs, child, out);
|
|
1295
|
+
}
|
|
1296
|
+
return out;
|
|
1297
|
+
}
|
|
1284
1298
|
async function removeDirectoryTree(fs, dir) {
|
|
1285
1299
|
let entries;
|
|
1286
1300
|
try {
|
|
@@ -1591,6 +1605,26 @@ var ConfigRepo = class {
|
|
|
1591
1605
|
// -----------------------------------------------------------------------
|
|
1592
1606
|
// Tombstone (Deletion Tracking)
|
|
1593
1607
|
// -----------------------------------------------------------------------
|
|
1608
|
+
/**
|
|
1609
|
+
* Write the tombstone record for `filePath` (new `.meta/tombstones` + legacy
|
|
1610
|
+
* mirror for one release cycle). Records only metadata — it never creates
|
|
1611
|
+
* the deleted file locally.
|
|
1612
|
+
*/
|
|
1613
|
+
async writeTombstoneFor(filePath) {
|
|
1614
|
+
const normalizedPath = filePath.startsWith("/") ? filePath : "/" + filePath;
|
|
1615
|
+
const tombstone = {
|
|
1616
|
+
path: normalizedPath,
|
|
1617
|
+
deletedAt: Date.now(),
|
|
1618
|
+
deletedBy: this.primaryBackendId,
|
|
1619
|
+
confirmedBy: [this.primaryBackendId]
|
|
1620
|
+
};
|
|
1621
|
+
const tombstoneBytes = new TextEncoder().encode(JSON.stringify(tombstone, null, 2));
|
|
1622
|
+
for (const dir of [TOMBSTONES_DIR, LEGACY_TOMBSTONES_DIR]) {
|
|
1623
|
+
const tombstonePath = tombstonePathFor(normalizedPath, dir);
|
|
1624
|
+
await this.ensureDir(tombstonePath);
|
|
1625
|
+
await this.cachedFS.writeFile(tombstonePath, tombstoneBytes);
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1594
1628
|
/**
|
|
1595
1629
|
* Delete a file and write a tombstone so the deletion propagates
|
|
1596
1630
|
* to all backends instead of being treated as "missing file → re-create".
|
|
@@ -1601,24 +1635,16 @@ var ConfigRepo = class {
|
|
|
1601
1635
|
if (await isDirectoryPath(this.cachedFS, normalizedPath)) {
|
|
1602
1636
|
const files = await collectFilesUnder(this.cachedFS, normalizedPath);
|
|
1603
1637
|
for (const file of files) await this.deleteFile(file);
|
|
1638
|
+
for (const dir of await collectDirectoriesUnder(this.cachedFS, normalizedPath)) {
|
|
1639
|
+
await this.writeTombstoneFor(dir === "/" ? "/.keep" : `${dir}/.keep`);
|
|
1640
|
+
}
|
|
1604
1641
|
await removeDirectoryTree(this.cachedFS, normalizedPath);
|
|
1605
1642
|
this.invalidateTombstoneCache();
|
|
1606
1643
|
this.schedulePostDeleteSync();
|
|
1607
1644
|
log2.log(`[ConfigRepo] deleteFile(directory): ${normalizedPath} (${files.length} file(s))`);
|
|
1608
1645
|
return;
|
|
1609
1646
|
}
|
|
1610
|
-
|
|
1611
|
-
path: normalizedPath,
|
|
1612
|
-
deletedAt: Date.now(),
|
|
1613
|
-
deletedBy: this.primaryBackendId,
|
|
1614
|
-
confirmedBy: [this.primaryBackendId]
|
|
1615
|
-
};
|
|
1616
|
-
const tombstoneBytes = new TextEncoder().encode(JSON.stringify(tombstone, null, 2));
|
|
1617
|
-
for (const dir of [TOMBSTONES_DIR, LEGACY_TOMBSTONES_DIR]) {
|
|
1618
|
-
const tombstonePath = tombstonePathFor(normalizedPath, dir);
|
|
1619
|
-
await this.ensureDir(tombstonePath);
|
|
1620
|
-
await this.cachedFS.writeFile(tombstonePath, tombstoneBytes);
|
|
1621
|
-
}
|
|
1647
|
+
await this.writeTombstoneFor(normalizedPath);
|
|
1622
1648
|
try {
|
|
1623
1649
|
await this.cachedFS.unlink(normalizedPath);
|
|
1624
1650
|
} catch {
|
|
@@ -3368,6 +3394,15 @@ var AppDataGroupImpl = class {
|
|
|
3368
3394
|
log2.warn(`[AppDataGroup:${this.groupId}] tombstone confirmations failed:`, err);
|
|
3369
3395
|
}
|
|
3370
3396
|
}
|
|
3397
|
+
/** Write a tombstone for `filePath`. Records metadata only — it never creates the file. */
|
|
3398
|
+
async writeTombstoneFor(filePath) {
|
|
3399
|
+
await this.tombstones.write({
|
|
3400
|
+
path: filePath.startsWith("/") ? filePath : `/${filePath}`,
|
|
3401
|
+
deletedAt: Date.now(),
|
|
3402
|
+
deletedBy: this.localBackendId,
|
|
3403
|
+
confirmedBy: [this.localBackendId]
|
|
3404
|
+
});
|
|
3405
|
+
}
|
|
3371
3406
|
/**
|
|
3372
3407
|
* Delete a data file with a tombstone in `.meta/tombstones/`.
|
|
3373
3408
|
* The tombstone is synced (`.meta/` is no longer excluded), so the deletion
|
|
@@ -3382,18 +3417,15 @@ var AppDataGroupImpl = class {
|
|
|
3382
3417
|
if (await isDirectoryPath(this.localFS, normalized)) {
|
|
3383
3418
|
const files = await collectFilesUnder(this.localFS, normalized);
|
|
3384
3419
|
for (const file of files) await this.deleteFile(file);
|
|
3420
|
+
for (const dir of await collectDirectoriesUnder(this.localFS, normalized)) {
|
|
3421
|
+
await this.writeTombstoneFor(dir === "/" ? "/.keep" : `${dir}/.keep`);
|
|
3422
|
+
}
|
|
3385
3423
|
await removeDirectoryTree(this.localFS, normalized);
|
|
3386
3424
|
this.schedulePostDeleteSync();
|
|
3387
3425
|
log2.log(`[AppDataGroup:${this.groupId}] deleteFile(directory): ${normalized} (${files.length} file(s))`);
|
|
3388
3426
|
return;
|
|
3389
3427
|
}
|
|
3390
|
-
|
|
3391
|
-
path: normalized,
|
|
3392
|
-
deletedAt: Date.now(),
|
|
3393
|
-
deletedBy: this.localBackendId,
|
|
3394
|
-
confirmedBy: [this.localBackendId]
|
|
3395
|
-
};
|
|
3396
|
-
await this.tombstones.write(tombstone);
|
|
3428
|
+
await this.writeTombstoneFor(normalized);
|
|
3397
3429
|
try {
|
|
3398
3430
|
await this.localFS.unlink(normalized);
|
|
3399
3431
|
} catch {
|
package/dist/zen-fs-config.js
CHANGED
|
@@ -27853,6 +27853,20 @@ var ZenFSConfig = (() => {
|
|
|
27853
27853
|
}
|
|
27854
27854
|
return out;
|
|
27855
27855
|
}
|
|
27856
|
+
async function collectDirectoriesUnder(fs, dir, out = []) {
|
|
27857
|
+
out.push(dir);
|
|
27858
|
+
let entries2;
|
|
27859
|
+
try {
|
|
27860
|
+
entries2 = await fs.readdir(dir);
|
|
27861
|
+
} catch {
|
|
27862
|
+
return out;
|
|
27863
|
+
}
|
|
27864
|
+
for (const entry of entries2) {
|
|
27865
|
+
const child = dir === "/" ? `/${entry}` : `${dir}/${entry}`;
|
|
27866
|
+
if (await isDirectoryPath(fs, child)) await collectDirectoriesUnder(fs, child, out);
|
|
27867
|
+
}
|
|
27868
|
+
return out;
|
|
27869
|
+
}
|
|
27856
27870
|
async function removeDirectoryTree(fs, dir) {
|
|
27857
27871
|
let entries2;
|
|
27858
27872
|
try {
|
|
@@ -28169,6 +28183,26 @@ var ZenFSConfig = (() => {
|
|
|
28169
28183
|
// -----------------------------------------------------------------------
|
|
28170
28184
|
// Tombstone (Deletion Tracking)
|
|
28171
28185
|
// -----------------------------------------------------------------------
|
|
28186
|
+
/**
|
|
28187
|
+
* Write the tombstone record for `filePath` (new `.meta/tombstones` + legacy
|
|
28188
|
+
* mirror for one release cycle). Records only metadata — it never creates
|
|
28189
|
+
* the deleted file locally.
|
|
28190
|
+
*/
|
|
28191
|
+
async writeTombstoneFor(filePath) {
|
|
28192
|
+
const normalizedPath = filePath.startsWith("/") ? filePath : "/" + filePath;
|
|
28193
|
+
const tombstone = {
|
|
28194
|
+
path: normalizedPath,
|
|
28195
|
+
deletedAt: Date.now(),
|
|
28196
|
+
deletedBy: this.primaryBackendId,
|
|
28197
|
+
confirmedBy: [this.primaryBackendId]
|
|
28198
|
+
};
|
|
28199
|
+
const tombstoneBytes = new TextEncoder().encode(JSON.stringify(tombstone, null, 2));
|
|
28200
|
+
for (const dir of [TOMBSTONES_DIR, LEGACY_TOMBSTONES_DIR]) {
|
|
28201
|
+
const tombstonePath = tombstonePathFor(normalizedPath, dir);
|
|
28202
|
+
await this.ensureDir(tombstonePath);
|
|
28203
|
+
await this.cachedFS.writeFile(tombstonePath, tombstoneBytes);
|
|
28204
|
+
}
|
|
28205
|
+
}
|
|
28172
28206
|
/**
|
|
28173
28207
|
* Delete a file and write a tombstone so the deletion propagates
|
|
28174
28208
|
* to all backends instead of being treated as "missing file → re-create".
|
|
@@ -28179,24 +28213,16 @@ var ZenFSConfig = (() => {
|
|
|
28179
28213
|
if (await isDirectoryPath(this.cachedFS, normalizedPath)) {
|
|
28180
28214
|
const files = await collectFilesUnder(this.cachedFS, normalizedPath);
|
|
28181
28215
|
for (const file of files) await this.deleteFile(file);
|
|
28216
|
+
for (const dir of await collectDirectoriesUnder(this.cachedFS, normalizedPath)) {
|
|
28217
|
+
await this.writeTombstoneFor(dir === "/" ? "/.keep" : `${dir}/.keep`);
|
|
28218
|
+
}
|
|
28182
28219
|
await removeDirectoryTree(this.cachedFS, normalizedPath);
|
|
28183
28220
|
this.invalidateTombstoneCache();
|
|
28184
28221
|
this.schedulePostDeleteSync();
|
|
28185
28222
|
log6.log(`[ConfigRepo] deleteFile(directory): ${normalizedPath} (${files.length} file(s))`);
|
|
28186
28223
|
return;
|
|
28187
28224
|
}
|
|
28188
|
-
|
|
28189
|
-
path: normalizedPath,
|
|
28190
|
-
deletedAt: Date.now(),
|
|
28191
|
-
deletedBy: this.primaryBackendId,
|
|
28192
|
-
confirmedBy: [this.primaryBackendId]
|
|
28193
|
-
};
|
|
28194
|
-
const tombstoneBytes = new TextEncoder().encode(JSON.stringify(tombstone, null, 2));
|
|
28195
|
-
for (const dir of [TOMBSTONES_DIR, LEGACY_TOMBSTONES_DIR]) {
|
|
28196
|
-
const tombstonePath = tombstonePathFor(normalizedPath, dir);
|
|
28197
|
-
await this.ensureDir(tombstonePath);
|
|
28198
|
-
await this.cachedFS.writeFile(tombstonePath, tombstoneBytes);
|
|
28199
|
-
}
|
|
28225
|
+
await this.writeTombstoneFor(normalizedPath);
|
|
28200
28226
|
try {
|
|
28201
28227
|
await this.cachedFS.unlink(normalizedPath);
|
|
28202
28228
|
} catch {
|
|
@@ -29940,6 +29966,15 @@ var ZenFSConfig = (() => {
|
|
|
29940
29966
|
log6.warn(`[AppDataGroup:${this.groupId}] tombstone confirmations failed:`, err2);
|
|
29941
29967
|
}
|
|
29942
29968
|
}
|
|
29969
|
+
/** Write a tombstone for `filePath`. Records metadata only — it never creates the file. */
|
|
29970
|
+
async writeTombstoneFor(filePath) {
|
|
29971
|
+
await this.tombstones.write({
|
|
29972
|
+
path: filePath.startsWith("/") ? filePath : `/${filePath}`,
|
|
29973
|
+
deletedAt: Date.now(),
|
|
29974
|
+
deletedBy: this.localBackendId,
|
|
29975
|
+
confirmedBy: [this.localBackendId]
|
|
29976
|
+
});
|
|
29977
|
+
}
|
|
29943
29978
|
/**
|
|
29944
29979
|
* Delete a data file with a tombstone in `.meta/tombstones/`.
|
|
29945
29980
|
* The tombstone is synced (`.meta/` is no longer excluded), so the deletion
|
|
@@ -29954,18 +29989,15 @@ var ZenFSConfig = (() => {
|
|
|
29954
29989
|
if (await isDirectoryPath(this.localFS, normalized)) {
|
|
29955
29990
|
const files = await collectFilesUnder(this.localFS, normalized);
|
|
29956
29991
|
for (const file of files) await this.deleteFile(file);
|
|
29992
|
+
for (const dir of await collectDirectoriesUnder(this.localFS, normalized)) {
|
|
29993
|
+
await this.writeTombstoneFor(dir === "/" ? "/.keep" : `${dir}/.keep`);
|
|
29994
|
+
}
|
|
29957
29995
|
await removeDirectoryTree(this.localFS, normalized);
|
|
29958
29996
|
this.schedulePostDeleteSync();
|
|
29959
29997
|
log6.log(`[AppDataGroup:${this.groupId}] deleteFile(directory): ${normalized} (${files.length} file(s))`);
|
|
29960
29998
|
return;
|
|
29961
29999
|
}
|
|
29962
|
-
|
|
29963
|
-
path: normalized,
|
|
29964
|
-
deletedAt: Date.now(),
|
|
29965
|
-
deletedBy: this.localBackendId,
|
|
29966
|
-
confirmedBy: [this.localBackendId]
|
|
29967
|
-
};
|
|
29968
|
-
await this.tombstones.write(tombstone);
|
|
30000
|
+
await this.writeTombstoneFor(normalized);
|
|
29969
30001
|
try {
|
|
29970
30002
|
await this.localFS.unlink(normalized);
|
|
29971
30003
|
} catch {
|