Fetcher class abstract

Provides access to a Resource from a Link.

Implementers

Constructors

Fetcher()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Closes any opened file handles, removes temporary files, etc.
get(Link link) Resource
Returns the Resource at the given link's HREF.
getWithHref(String href) Resource
Returns the Resource at the given href.
guessTitle() Future<String?>
Known resources available in the medium, such as file paths on the file system or entries in a ZIP archive. This list is not exhaustive, and additional unknown resources might be reachable.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAsJsonOrNull(String href) Future<Map<String, dynamic>?>
Returns the resource data as a JSON object at the given href, or null.
readAsXmlOrNull(String href) Future<XmlDocument?>
Returns the resource data as an XML Document at the given href, or null.
readBytes(Link link) Future<ByteData>
Returns the resource data at the given Link's HREF, or throws a Resource.Exception
readBytesWithHref(String href) Future<ByteData>
Returns the resource data at the given href, or throws a Resource.Exception
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromArchiveOrDirectory(String path, {ArchiveFactory archiveFactory = const DefaultArchiveFactory()}) Future<Fetcher?>
Creates a Fetcher from either an archive file, or an exploded directory.