Module disk_usage

Module disk_usage 

Source
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 with .with_root(...).

To monitor this folder size, DiskUsage offers two methods:

  • .exec() to retrieve an immediate DiskUsageTree and
  • .observe(...) to call a callback every time changes occur in the Ditto folder.

Structs§

DiskUsage
Used to monitor the disk usage of Ditto or of its sub-components.
DiskUsageChild
Entry in a file system
DiskUsageObserverCtx
Handle returned by DiskUsage::observe. Keep it in scope as long you want to receive updates on a given Ditto Subdirectory.

Enums§

FileSystemType
Existing type in most file system.

Traits§

DiskUsageCallback
An alias for 'static + Send + FnMut(DiskUsageChild). Callback bounds for the DiskUsage .observe(...) handler.

Type Aliases§

DiskUsageObserverHandle
Alias for the observer type returned by .observe(...).