PseudoDir class

*[<Null safety>](*

A PseudoDir is a directory-like object whose entries are constructed by a program at runtime. The client can lookup, enumerate, and watch these directory entries but it cannot create, remove, or rename them.

This class is designed to allow programs to publish a relatively small number of entries (up to a few hundreds) such as services, file-system roots, debugging PseudoFile.

This version doesn't support watchers, should support watchers if needed.




PseudoDir ()


hashCode → int

The hash code for this object.
read-only, inherited

runtimeType → Type

A representation of the runtime type of the object.
read-only, inherited


addNode(String name, Vnode node) int

Adds a directory entry associating the given name with node. It is ok to add the same Vnode multiple times with different names.

close() void

Close this node and all of its bindings and children.

connect(dynamic flags, int mode, InterfaceRequest request, [dynamic parentFlags]) int

Connects to this instance of PseudoDir and serves fidl_fuchsia_io.Directory over fidl.

filterForNodeReference(dynamic flags) dynamic

Filter flags when OpenFlags.nodeReference is passed. This will maintain compatibility with c++ layer.

inodeNumber() int

Inode number as defined in

isEmpty() bool

Checks if directory is empty.

listNodeNames() List<String>

Returns names of the the nodes present in this directory.

lookup(String name) Vnode?

Looks up a node for given name.

noSuchMethod(Invocation invocation) dynamic

Invoked when a non-existent method or property is accessed.

open(dynamic flags, int mode, String path, InterfaceRequest request, [dynamic parentFlags]) void

This function is called from fidl_fuchsia_io.Directory#open. This function parses path and opens correct node.

removeAllNodes() void

Removes all directory entries.

removeNode(String name) int

Removes a directory entry with the given name.

sendErrorEvent(dynamic flags, int status, InterfaceRequest request) void

Create a error node to send onOpen event with failure status.

serve(InterfaceRequest request, {dynamic rights}) int

Serves this request directory over request channel. Caller may specify the rights granted to the request connection. If rights is omitted, it defaults to readable and writable.

toString() String

A string representation of this object.

type() dynamic



operator ==(Object other) bool

The equality operator.