MCPcopy Create free account
hub / github.com/cloudflare/computer / removeReplaceableFinalEntry

Function removeReplaceableFinalEntry

packages/dofs/src/sync/apply.ts:84–94  ·  view source on GitHub ↗
(
  db: Database,
  path: string,
  incomingKind: "file" | "symlink",
)

Source from the content-addressed store, hash-verified

82}
83
84function removeReplaceableFinalEntry(
85 db: Database,
86 path: string,
87 incomingKind: "file" | "symlink",
88): void {
89 const existing = resolveInode(db, path, { followSymlinks: false });
90 if (existing === null) return;
91 if (incomingKind === "file" && existing.type === "file") return;
92
93 removeInodeTreeAtPath(db, path, existing.inode, existing.type);
94}
95
96// Structural conflict cleanup for upstream applies. This removes
97// the local shape without recording tombstones because the incoming

Callers 2

applyChangesFunction · 0.85
applyChangesSyncFunction · 0.85

Calls 2

resolveInodeFunction · 0.85
removeInodeTreeAtPathFunction · 0.85

Tested by

no test coverage detected