Function writeDurableJson

  • Atomically replaces one private state file and syncs both its bytes and directory entry. A failure before the rename (a value JSON cannot hold, a full disk, a rename refused) removes the temporary file it made and throws that error, so no copy of the state is left beside the file.

    Parameters

    • path: string
    • value: unknown

    Returns void