create
Creates a new repository.
Parameters
the Ouisync session.
path to the local file to store the repository in. It's recommended to use the "ouisyncdb" file extension, but any extension works.
local secret for reading the repository on this device only. Do not share with peers!. If null, the repo won't be protected and anyone with physical access to the device will be able to read it.
local secret for writing to the repository on this device only. Do not share with peers! Can be the same as readSecret
if one wants to use only one secret for both reading and writing. Separate secrets are useful for plausible deniability. If both readSecret
and writeSecret
are null, the repo won't be protected and anyone with physical access to the device will be able to read and write to it. If readSecret
is not null but writeSecret
is null, the repo won't be writable from this device.
used to share repositories between devices. If not null, this repo will be linked with the repos with the same share token on other devices. See also createShareToken. This also determines the maximal access mode the repo can be opened in. If null, it's write mode.