FileResource<T> class

Wraps a File on a file system.

Inheritance

Constructors

FileResource(File file, {bool binary: false, Encoding encoding: utf8, bool flushOnWrite: false, Parser<T> parser})

Properties

binary → bool
final
encoding → Encoding
Only used if binary is false.
final
exists → Future<bool>
read-only, override
file File
final
flushOnWrite → bool
final
lastModified → Future<DateTime>
Returns null if exists is false.
read-only, override
basename → String
The basename() of the path.
read-only, inherited
data → T
Synchronously get the most recently loaded data.
read-only, inherited
hashCode → int
The hash code for this object.
read-only, inherited
location → String
The location (a path or url) of the resource.
final, inherited
parser Parser<T>
final, inherited
path → String
This resource's path on the system.
read-only, inherited
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. [...]
override
fetchContents() → Future
Fetch the raw contents from the underlying platform. [...]
override
write(dynamic contents) → Future<T>
Persist the contents to disk. [...]
override
get({bool forceReload: false}) → Future<T>
Gets the most readily available data or refreshes it if forceReload is true.
inherited
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. [...]
inherited
preParseContents(dynamic contents) → dynamic
For internal parsing before calling parseContents.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

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