| |
| |
| |
| # PseudoDir class |
| |
| |
| |
| |
| |
| |
| *[<Null safety>](https://dart.dev/null-safety)* |
| |
| |
| |
| <p>A <a href="../package-fuchsia_vfs_vfs/PseudoDir-class.md">PseudoDir</a> 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.</p> |
| <p>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 <a href="../package-fuchsia_vfs_vfs/PseudoFile-class.md">PseudoFile</a>.</p> |
| <p>This version doesn't support watchers, should support watchers if needed.</p> |
| |
| |
| |
| **Inheritance** |
| |
| - Object |
| - [Vnode](../package-fuchsia_vfs_vfs/Vnode-class.md) |
| - PseudoDir |
| |
| |
| |
| **Implementers** |
| |
| - [ComposedPseudoDir](../package-fuchsia_vfs_vfs/ComposedPseudoDir-class.md) |
| |
| |
| |
| |
| |
| ## Constructors |
| |
| [PseudoDir](../package-fuchsia_vfs_vfs/PseudoDir/PseudoDir.md) () |
| |
| |
| |
| |
| ## Properties |
| |
| ##### [hashCode](../package-fuchsia_vfs_vfs/Vnode/hashCode.md) → int |
| |
| |
| |
| The hash code for this object. |
| _<span class="feature">read-only</span><span class="feature">inherited</span>_ |
| |
| |
| |
| ##### [runtimeType](../package-fuchsia_vfs_vfs/Vnode/runtimeType.md) → Type |
| |
| |
| |
| A representation of the runtime type of the object. |
| _<span class="feature">read-only</span><span class="feature">inherited</span>_ |
| |
| |
| |
| |
| |
| ## Methods |
| |
| ##### [addNode](../package-fuchsia_vfs_vfs/PseudoDir/addNode.md)(String name, [Vnode](../package-fuchsia_vfs_vfs/Vnode-class.md) node) int |
| |
| |
| |
| Adds a directory entry associating the given <code>name</code> with <code>node</code>. |
| It is ok to add the same Vnode multiple times with different names. |
| |
| |
| |
| |
| ##### [close](../package-fuchsia_vfs_vfs/PseudoDir/close.md)() void |
| |
| |
| |
| Close this node and all of its bindings and children. |
| _<span class="feature">override</span>_ |
| |
| |
| |
| ##### [connect](../package-fuchsia_vfs_vfs/PseudoDir/connect.md)(dynamic flags, int mode, [InterfaceRequest](../package-fidl_fidl/InterfaceRequest-class.md) request, [dynamic parentFlags]) int |
| |
| |
| |
| Connects to this instance of <a href="../package-fuchsia_vfs_vfs/PseudoDir-class.md">PseudoDir</a> and serves |
| <code>fidl_fuchsia_io.Directory</code> over fidl. |
| _<span class="feature">override</span>_ |
| |
| |
| |
| ##### [filterForNodeReference](../package-fuchsia_vfs_vfs/Vnode/filterForNodeReference.md)(dynamic flags) dynamic |
| |
| |
| |
| Filter flags when <code>OpenFlags.nodeReference</code> is passed. |
| This will maintain compatibility with c++ layer. |
| _<span class="feature">inherited</span>_ |
| |
| |
| |
| ##### [inodeNumber](../package-fuchsia_vfs_vfs/PseudoDir/inodeNumber.md)() int |
| |
| |
| |
| Inode number as defined in fuchsia.io. |
| _<span class="feature">override</span>_ |
| |
| |
| |
| ##### [isEmpty](../package-fuchsia_vfs_vfs/PseudoDir/isEmpty.md)() bool |
| |
| |
| |
| Checks if directory is empty. |
| |
| |
| |
| |
| ##### [listNodeNames](../package-fuchsia_vfs_vfs/PseudoDir/listNodeNames.md)() List<String> |
| |
| |
| |
| Returns names of the the nodes present in this directory. |
| |
| |
| |
| |
| ##### [lookup](../package-fuchsia_vfs_vfs/PseudoDir/lookup.md)(String name) [Vnode](../package-fuchsia_vfs_vfs/Vnode-class.md)? |
| |
| |
| |
| Looks up a node for given <code>name</code>. |
| |
| |
| |
| |
| ##### [noSuchMethod](../package-fuchsia_vfs_vfs/Vnode/noSuchMethod.md)(Invocation invocation) dynamic |
| |
| |
| |
| Invoked when a non-existent method or property is accessed. |
| _<span class="feature">inherited</span>_ |
| |
| |
| |
| ##### [open](../package-fuchsia_vfs_vfs/PseudoDir/open.md)(dynamic flags, int mode, String path, [InterfaceRequest](../package-fidl_fidl/InterfaceRequest-class.md) request, [dynamic parentFlags]) void |
| |
| |
| |
| This function is called from <code>fidl_fuchsia_io.Directory#open</code>. |
| This function parses path and opens correct node. |
| _<span class="feature">override</span>_ |
| |
| |
| |
| ##### [removeAllNodes](../package-fuchsia_vfs_vfs/PseudoDir/removeAllNodes.md)() void |
| |
| |
| |
| Removes all directory entries. |
| |
| |
| |
| |
| ##### [removeNode](../package-fuchsia_vfs_vfs/PseudoDir/removeNode.md)(String name) int |
| |
| |
| |
| Removes a directory entry with the given <code>name</code>. |
| |
| |
| |
| |
| ##### [sendErrorEvent](../package-fuchsia_vfs_vfs/Vnode/sendErrorEvent.md)(dynamic flags, int status, [InterfaceRequest](../package-fidl_fidl/InterfaceRequest-class.md) request) void |
| |
| |
| |
| Create a error node to send onOpen event with failure status. |
| _<span class="feature">inherited</span>_ |
| |
| |
| |
| ##### [serve](../package-fuchsia_vfs_vfs/PseudoDir/serve.md)([InterfaceRequest](../package-fidl_fidl/InterfaceRequest-class.md) request, {dynamic rights}) int |
| |
| |
| |
| Serves this <code>request</code> directory over request channel. |
| Caller may specify the rights granted to the <code>request</code> connection. |
| If <code>rights</code> is omitted, it defaults to readable and writable. |
| |
| |
| |
| |
| ##### [toString](../package-fuchsia_vfs_vfs/Vnode/toString.md)() String |
| |
| |
| |
| A string representation of this object. |
| _<span class="feature">inherited</span>_ |
| |
| |
| |
| ##### [type](../package-fuchsia_vfs_vfs/PseudoDir/type.md)() dynamic |
| |
| |
| |
| |
| _<span class="feature">override</span>_ |
| |
| |
| |
| |
| |
| ## Operators |
| |
| ##### [operator ==](../package-fuchsia_vfs_vfs/Vnode/operator_equals.md)(Object other) bool |
| |
| |
| |
| The equality operator. |
| _<span class="feature">inherited</span>_ |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |