LocalResource<T> class

A local resources such as a native file or browser cache.

Inheritance
Implementers

Constructors

LocalResource({@required String path, Parser<T> parser})

Properties

basename String
The basename() of the path.
read-only
data → T
Synchronously get the most recently loaded data.
read-only, override
exists Future<bool>
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
lastModified Future<DateTime>
Returns null if exists is false.
read-only
location String
The location (a path or url) of the resource.
final, inherited
parser Parser<T>
final
path String
This resource's path on the system.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

delete() Future<void>
Remove this resource from disk and sets data to null. [...]
fetchContents() Future
Fetch the raw contents from the underlying platform. [...]
inherited
get({bool forceReload: false}) Future<T>
Gets the most readily available data or refreshes it if forceReload is true.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
parseContents(dynamic contents) → T
contents is a String or List<int>, depending on whether the underlying resource is binary or string based. [...]
preParseContents(dynamic contents) → dynamic
For internal parsing before calling parseContents.
toString() String
Returns a string representation of this object.
inherited
write(dynamic contents) Future<T>
Persist the contents to disk. [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited