Expand description
Use ditto.disk_usage() to access the DiskUsage API to inspect Ditto’s disk usage.
§Monitor disk usage on a device
In order to persist data on a device, Ditto can create a local database in a folder specified
via DittoConfig::persistence_directory.
To monitor this folder size, DiskUsage offers two methods:
.item()to retrieve an immediateDiskUsageItemtree and.observe(...)to call a callback every time changes occur in the Ditto folder.
Structs§
- Disk
Usage - Used to monitor the disk usage of Ditto or of its sub-components.
- Disk
Usage Item - Represents an entry in the file system tree returned by
DiskUsage. - Disk
Usage Observer - Handle returned by
DiskUsage::observe.
Enums§
- File
System Type - Represents the type of file system entry (directory, file, or symbolic link).
Traits§
- Disk
Usage Callback - An alias for
'static + Send + FnMut(DiskUsageItem). Callback bounds for theDiskUsage.observe(...)handler.
Type Aliases§
- Disk
Usage Observer Handle - Alias for the observer type returned by
.observe(...).