minca

Function: createFolderAdapter()

function createFolderAdapter(
   root, 
   path, 
   options?
): Promise<FolderAdapter>;

Defined in: packages/core/src/storage/folder-adapter.ts:161

Opens a storage adapter backed by a directory on the user's disk. Versions are held in memory too, or a query would read one file per record; so are the entries' keys, or every listing would read the whole directory. Their values are not: they include file chunks, and the disk's cache holds them.

Parameters

ParameterTypeDescription
rootDirectoryHandleLike-
pathstringWhere to keep these files from the folder root, / separating subdirectories, so several accounts can each have a subtree.
options?{ shared?: boolean; }-
options.shared?booleanOthers write these entries as this reads them, and nothing reloads it: every read of an entry goes to the disk.

Returns

Promise<FolderAdapter>

On this page