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

Function flushPendingByPath

packages/dofs/src/fs/writeFile.ts:726–732  ·  view source on GitHub ↗
(db: Database, path: string, now: () => number)

Source from the content-addressed store, hash-verified

724 * committed. External callers should never invoke this directly.
725 */
726export function flushPendingByPath(db: Database, path: string, now: () => number): boolean {
727 const { path: canonical } = canonicalizePath(path);
728 const entry = getPendingWriteBufferByPath(db, canonical);
729 if (entry === undefined || entry.pending === undefined) return false;
730 commitPendingBuffer(db, entry, now);
731 return true;
732}
733
734function releasePendingBuffer(db: Database, entry: WriteBufferEntry, now: () => number): void {
735 if (entry.pending === undefined) return;

Callers 4

unlinkSyncMethod · 0.85
linkSyncMethod · 0.85
renameSyncMethod · 0.85

Calls 3

canonicalizePathFunction · 0.85
commitPendingBufferFunction · 0.85

Tested by

no test coverage detected