Synclets logoSynclets

createDirectorySynclet

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

createDirectorySynclet<Depth>(options: DirectorySyncletOptions<Depth>): Promise<Synclet<Depth, DirectoryDataConnector<Depth>, DirectoryMetaConnector<Depth>>>
TypeDescription
optionsDirectorySyncletOptions<Depth>

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

returnsPromise<Synclet<Depth, DirectoryDataConnector<Depth>, DirectoryMetaConnector<Depth>>>

A Promise resolving to the configured Synclet instance.

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

Since

v0.0.0