lix-storage-filesystem
Filesystem-backed storage for Lix. The Rust crate and JavaScript package expose the same adapter with independently versioned releases.
JavaScript
import { openLix } from "@lix-js/sdk";
import { FilesystemStorage } from "@lix-js/storage-filesystem";
const storage = new FilesystemStorage({ path: "./repository" });
const lix = await openLix({ storage });
The whole repository is synchronized by default. Pass syncAllFiles: false
and use storage.importPaths(paths) for selective synchronization.
Rust
use open_lix;
use FilesystemStorage;
# async
The storage owns synchronization until storage.stop_sync().await? or until
the final storage/repository instance is dropped. Explicitly stopping is useful
for tests and before immediately reopening the same path.