absolutePersistenceDirectory

The absolute path to the persistence directory used by this Ditto instance to persist data.

This property returns the final, resolved absolute file path to the directory used by ditto to persist data.The value depends on what was provided in DittoConfig.persistenceDirectory:

  • If an absolute path was provided, that path is used as-is.

  • If a relative path was provided, it is resolved relative to the defaultRootDirectory.

  • If no persistence directory was specified, a default directory named "ditto-{database-id}" is created under the defaultRootDirectory where {database-id} is the Ditto database ID in lowercase.

This property always returns a consistent value throughout the lifetime of the Ditto instance and represents the actual directory being used for persistence.

Note: "Database ID" was previously referred to as "App ID" in older versions of the SDK.

Note: It is not recommended to directly read from or write to this directory as its structure and content are managed by Ditto and may change in future versions.

Note: When DittoLogger is enabled, logs may be written to this directory even after a Ditto instance has been deallocated. Please refer to the documentation for DittoLogger for more information.

Since

4.12.0

See also