earthstar-project / earthstar

Storage for private, distributed, offline-first applications.
https://earthstar-project.org
GNU Lesser General Public License v3.0
632 stars 20 forks source link

Add a function to sync a replica with a filesystem directory. #241

Closed sgwilym closed 2 years ago

sgwilym commented 2 years ago

This adds a new function called syncReplicaAndFsDir, which synchronises an Earthstar replica with a filesystem directory.

A few caveats, as the mapping from the filesystem to Earthstar is not perfect:

For the moment this function is exclusive to the Deno distribution. Theoretically it can be automatically mapped to the Node version, but there are some issues I'm trying to resolve.