DiskConfig.local constructor
A folder on the device, inside root.
Keep your files in their own prefix folder when other plugins write
to the same root: without a prefix, emptying the whole disk is refused.
With prune, files older than that are deleted in the background the
first time the disk is used in each session. On the web, which has no
file system, the disk lives in memory.
Implementation
factory DiskConfig.local(
DiskRoot root, {
String prefix = '',
bool readOnly = false,
Duration? prune,
}) => DiskConfig._(
createDriver: () =>
kIsWeb ? MemoryDiskDriver() : LocalDiskDriver(root.resolve),
prefix: prefix,
readOnly: readOnly,
prune: prune,
protectRoot: prefix.isEmpty,
);