DirectoryDescriptor class

A descriptor describing a directory that may contain nested descriptors.

In addition to the normal descriptor methods, this has a load method that allows it to be used as a virtual filesystem.

This may be extended outside this package.

Inheritance

Constructors

DirectoryDescriptor(String name, Iterable<Descriptor> contents)
DirectoryDescriptor.fromFilesystem(String name, String path)
Creates a directory descriptor named name that describes the physical directory at path.
factory

Properties

contents List<Descriptor>
Descriptors for entries in this directory.
final
hashCode int
The hash code for this object.
no setterinherited
io Directory
Returns a dart:io Directory 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
load(String path) Stream<List<int>>
Treats this descriptor as a virtual filesystem and loads the binary contents of the FileDescriptor at the given relative path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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