Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/willow/src/store/storage/payload_drivers/filesystem.ts>PayloadDriverFilesystem

Exploring Willow in the most efficient and sound programming language
Go to Latest
class PayloadDriverFilesystem
import { PayloadDriverFilesystem } from "https://deno.land/x/willow@0.2.1/src/store/storage/payload_drivers/filesystem.ts";

Stores and retrieves payloads from the filesystem.

Constructors

new
PayloadDriverFilesystem(path: string, payloadScheme: PayloadScheme<PayloadDigest>)

Type Parameters

PayloadDigest

Methods

private
ensureDir(...args: string[])
private
getKey(hash: PayloadDigest): string
private
getPayload(filePath: string): Payload
erase(payloadHash: PayloadDigest): Promise<true | ValidationError>
get(payloadHash: PayloadDigest): Promise<Payload | undefined>
length(payloadHash: PayloadDigest): Promise<bigint>
receive(opts: { payload: AsyncIterable<Uint8Array> | Uint8Array; offset: number; knownLength: bigint; knownDigest: PayloadDigest; }): Promise<{ digest: PayloadDigest; length: bigint; }>
set(payload: Uint8Array | AsyncIterable<Uint8Array>): Promise<{ digest: PayloadDigest; payload: Payload; length: bigint; }>