Synclets logoSynclets

createFileSynclet

The createFileSynclet function creates a file-backed Synclet with both data and metadata persistence in a single call.

createFileSynclet<Depth>(options: FileSyncletOptions<Depth>): Promise<FileSynclet<Depth>>
TypeDescription
optionsFileSyncletOptions<Depth>

Configuration object specifying file paths, transport, and other Synclet options.

returnsPromise<FileSynclet<Depth>>

A Promise resolving to the configured Synclet instance.

This is the recommended approach for file-based persistence in Node.js. The function provides a simplified API that creates both the DataConnector and MetaConnector internally, along with the Synclet instance.

Since

v0.0.0