Skip to main content
Module

x/earthstar/src/entries/deno.ts>syncReplicaAndFsDir

Storage for private, distributed, offline-first applications.
Go to Latest
function syncReplicaAndFsDir
import { syncReplicaAndFsDir } from "https://deno.land/x/earthstar@v10.0.2/src/entries/deno.ts";

Syncs an earthstar replica with a directory on the filesystem, representing Earthstar documents as files and vice versa. Make sure you understand the changes this function could enact upon a given directory before using it, as it can delete files in certain circumstances.

  • Changes from the filesystem which are superseded by writes from the replica will still be synced to the replica as an older version of the document, provided they were authored by different identities.
  • If a file has a path containing a ! (i.e. an ephemeral path), it will be deleted unless a correspending document is found in the replica.

Parameters

opts: SyncFsOptions