footprintjs - v11.2.0
    Preparing search index...

    Interface FileSink

    A record sink that appends to one file — RecordSink plus what the app needs to manage the file.

    interface FileSink {
        acknowledge: (
            target: CaptureHistoryTarget,
            context: { signal: AbortSignal },
        ) => Promise<CaptureHistoryReceipt>;
        bytes: number;
        full: boolean;
        path: string;
        queuedBytes: number;
        close(): Promise<void>;
    }

    Hierarchy

    Index
    acknowledge: (
        target: CaptureHistoryTarget,
        context: { signal: AbortSignal },
    ) => Promise<CaptureHistoryReceipt>

    Resolve only after this target's evidence, commits and end entry are durably stored together.

    bytes: number

    Bytes this sink knows are on disk: the file's size when it opened plus every byte its writes completed — a running sum, not the file's end (writes complete out of order; a failed one leaves a hole).

    full: boolean

    true once an entry was refused for maxBytes: the file is full, and only a closing entry may still go.

    path: string

    The absolute path the sink writes to — resolved once, when it was made.

    queuedBytes: number

    Bytes accepted and not yet written.

    • Release the file. Idempotent. Every entry after it is refused (the run counts it), and flush() rejects; entries already accepted are still written (and a flush already started finishes), then the file is closed — the promise settles then.

      Returns Promise<void>