Skip to main content
Module

x/earthstar_replica_server/deps.ts>Earthstar.AttachmentDriverFilesystem

An always-online Earthstar peer for your shares.
Latest
class Earthstar.AttachmentDriverFilesystem
import { Earthstar } from "https://deno.land/x/earthstar_replica_server@4.0.0-beta.1/deps.ts";
const { AttachmentDriverFilesystem } = Earthstar;

An attachment driver which persists attachments using the local filesystem. Works with Deno and Node.

Constructors

new
AttachmentDriverFilesystem(path: string)

Properties

private
closed: boolean
private
path: string

Methods

private
ensureDir(...args: string[])
close(erase: boolean)
erase(formatName: string, attachmentHash: string)
filter(attachments: Record<string, Set<string>>): Promise<{ format: string; hash: string; }[]>
getAttachment(formatName: string, attachmentHash: string): Promise<DocAttachment | undefined>
isClosed(): boolean
stage(formatName: string, attachment: ReadableStream<Uint8Array> | Uint8Array)