DownloadCache class final

The per-user cache shared by every project on this machine: archives stored under their SHA-256, so a version downloaded once installs anywhere without the network, and thumbnails.

Constructors

DownloadCache(String dir)
A cache in dir.

Properties

archives → HashedFiles
The archives, under their SHA-256.
final
dir → String
The cache folder.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sizeInBytes → int
The cache's size on disk, in bytes.
no setter

Methods

archive(String sha256) → Uint8List?
The cached archive whose SHA-256 is sha256, checked again; null when missing, damaged (a damaged copy is deleted), or busy in another process.
clear() → void
Deletes everything cached.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putArchive(String sha256, List<int> bytes) → void
Keeps bytes, whose SHA-256 the caller has checked is sha256, as that archive.
thumbnailFile(Uri uri) → File
Where the picture at uri is cached.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited