FileDescriptor class abstract

A descriptor describing a single file.

In addition to the normal descriptor methods, this has read and readAsBytes methods that allows its contents to be read.

This may be extended outside this package.

Inheritance

Constructors

FileDescriptor(String name, Object? contents)
Creates a new FileDescriptor with name and contents.
factory
FileDescriptor.binaryMatcher(String name, Matcher matcher)
Creates a new binary FileDescriptor with name that matches its binary contents against matcher.
factory
FileDescriptor.protected(String name)
A protected constructor that's only intended for subclasses.

Properties

hashCode int
The hash code for this object.
no setterinherited
io File
Returns a dart:io File object that refers to this file within sandbox.
no setter
name String
This entry's basename.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

create([String? parent]) Future<void>
Creates this entry within the parent directory, which defaults to sandbox.
override
describe() String
Returns a human-friendly tree-style description of this descriptor.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read() Future<String>
Reads and decodes the contents of this descriptor as a UTF-8 string.
readAsBytes() Stream<List<int>>
Reads the contents of this descriptor as a byte stream.
toString() String
A string representation of this object.
inherited
validate([String? parent]) Future<void>
Validates that the physical file system under parent (which defaults to sandbox) contains an entry that matches this descriptor.
override

Operators

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