blob: c7aec90c60f4543e32df6a53c0019144555afbd1 [file] [log] [blame] [view] [edit]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.io2
<h1>Library Overview</h1>
## **PROTOCOLS**
## AdvisoryLocking {#AdvisoryLocking}
*Defined in [fuchsia.io2/locking.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/locking.fidl;l=20)*
<p>Advisory locking protocol.</p>
<p>This protocol is intended to be composed into the |File| protocol to
provide support for advisory locking.</p>
<p>Advisory locks are purely advisory. They do not prevent actual read or
write operations from occurring on the file, either through this
connection or through other connections.</p>
<p>These primitives are designed to support the flock() and fcntl(),
specifically F_SETLK, F_SETLKW, and F_GETLK, functionality that code
running on Fuchsia expects from other operating systems.</p>
### AdvisoryLock {#AdvisoryLocking.AdvisoryLock}
<p>Acquires an advisory lock on the underlying file.</p>
<p>The lock lasts until either this connection is closed or
this method is called with |AdvisoryLockType.UNLOCK| to release the lock
explicitly.</p>
<p>Advisory locks are purely advisory. They do not prevent actual read or
write operations from occurring on the file, either through this
connection or through other connections.</p>
<p>This method requires the following rights:</p>
<ul>
<li><a class='link' href='#Rights.READ_BYTES'>Rights.READ_BYTES</a> if <code>request.type</code> is <a class='link' href='#AdvisoryLockType.READ'>AdvisoryLockType.READ</a>.</li>
<li><a class='link' href='#Rights.WRITE_BYTES'>Rights.WRITE_BYTES</a> if <code>request.type</code> is
<a class='link' href='#AdvisoryLockType.WRITE'>AdvisoryLockType.WRITE</a>.</li>
</ul>
<h1>Errors</h1>
<ul>
<li><code>ZX_ERR_BAD_STATE</code> The specified type of lock cannot be acquired. For
example, another connection might hold a conflicting lock type.</li>
<li><code>ZX_ERR_NOT_SUPPORTED</code> This file does not support advisory locking.</li>
<li><code>ZX_ERR_ACCESS_DENIED</code> This connection does not have sufficient rights
to acquire the given type of lock.</li>
</ul>
#### Request {#AdvisoryLocking.AdvisoryLock_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>request</code></td>
<td>
<code><a class='link' href='#AdvisoryLockRequest'>AdvisoryLockRequest</a></code>
</td>
</tr></table>
#### Response {#AdvisoryLocking.AdvisoryLock_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#AdvisoryLocking_AdvisoryLock_Result'>AdvisoryLocking_AdvisoryLock_Result</a></code>
</td>
</tr></table>
## Debuglog {#Debuglog}
*Defined in [fuchsia.io2/debuglog.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/debuglog.fidl;l=11)*
<p>A node for interacting with the kernel debug log.
It may be manipulated via the debuglog object returned from
the <code>DebuglogInfo</code> member in <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Representation'>Representation</a>.</p>
### Close {#Debuglog.Close}
<p>Terminates the connection to the node.</p>
<p>After calling <code>Close</code>, the client must not send any other requests.
The result of <code>Close</code> arrives as an epitaph, where the channel is closed
by the server upon processing this operation.</p>
<p>Closing the client end of the channel should be semantically equivalent
to calling <code>Close</code> without monitoring the status epitaph.</p>
<p>This method does not require any rights.</p>
#### Request {#Debuglog.Close_Request}
&lt;EMPTY&gt;
### Describe {#Debuglog.Describe}
<p>Returns extra connection information and auxiliary handles.</p>
<ul>
<li><code>query</code> specifies the fields in <code>ConnectionInfo</code> that the caller is
interested in.</li>
</ul>
<ul>
<li><code>info</code> see <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.</li>
</ul>
<p>When all known bits in <code>query</code> are set, the return value matches
the one from <a class='link' href='#OnConnectionInfo'>OnConnectionInfo</a>, as if the caller requested that event
using <a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>.</p>
<p>If the <code>Describe</code> operation fails, the connection is closed with the
associated error.</p>
<p>This method does not require any rights.</p>
#### Request {#Debuglog.Describe_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#ConnectionInfoQuery'>ConnectionInfoQuery</a></code>
</td>
</tr></table>
#### Response {#Debuglog.Describe_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### GetAttributes {#Debuglog.GetAttributes}
<p>Acquires information about the node.</p>
<p>The attributes of a node should be stable, independent of the
specific protocol used to access it.</p>
<ul>
<li><code>query</code> a bit-mask specifying which attributes to fetch. The server
should not return more than necessary.</li>
</ul>
<ul>
<li><code>attributes</code> the returned attributes.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.GET_ATTRIBUTES'>Rights.GET_ATTRIBUTES</a> right.</p>
#### Request {#Debuglog.GetAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#NodeAttributesQuery'>NodeAttributesQuery</a></code>
</td>
</tr></table>
#### Response {#Debuglog.GetAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetAttributes_Result'>Node_GetAttributes_Result</a></code>
</td>
</tr></table>
### GetToken {#Debuglog.GetToken}
<p>Acquires a token which can be used to identify this connection at
a later point in time.</p>
<p>This method does not require any rights. Note that the token identifies
the connection, hence carries the rights information on this connection.</p>
#### Request {#Debuglog.GetToken_Request}
&lt;EMPTY&gt;
#### Response {#Debuglog.GetToken_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetToken_Result'>Node_GetToken_Result</a></code>
</td>
</tr></table>
### OnConnectionInfo {#Debuglog.OnConnectionInfo}
<p>An event produced eagerly by the server if requested by
<a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>. This event will be the
first message from the server, and is sent exactly once.</p>
<ul>
<li><code>info</code> See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.
All members should be present.</li>
</ul>
<p>Different from <a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#OnOpen'>OnOpen</a>, an error during open/reopen is
always manifested as an epitaph.</p>
#### Response {#Debuglog.OnConnectionInfo_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### Reopen {#Debuglog.Reopen}
<p>Creates another connection to the same node.</p>
<ul>
<li><code>options</code> options applicable to both <code>Open</code> and <code>Reopen</code>,
including negotiating protocol and restricting rights.
See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionOptions'>ConnectionOptions</a>.</li>
<li><code>object_request</code> is the server end of a channel created for the new
connection. The caller may proceed to send messages on the
corresponding client end right away.</li>
</ul>
<p>For files, the cloned connection and the original connection have
independent seek offsets.</p>
#### Request {#Debuglog.Reopen_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ConnectionOptions'>ConnectionOptions</a></code>
</td>
</tr><tr>
<td><code>object_request</code></td>
<td>
<code>handle&lt;channel&gt;</code>
</td>
</tr></table>
### Sync {#Debuglog.Sync}
<p>Synchronizes updates to the node to the underlying media, if it exists.</p>
<p>This method will return when the filesystem server has flushed the
relevant updates to the underlying media, but does not guarantee the
underlying media has persisted the information, nor that any information
is committed to hardware. Clients may use <code>Sync</code> to ensure ordering
between operations.</p>
<p>This method does not require any rights.</p>
#### Request {#Debuglog.Sync_Request}
&lt;EMPTY&gt;
#### Response {#Debuglog.Sync_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_Sync_Result'>Node_Sync_Result</a></code>
</td>
</tr></table>
### UpdateAttributes {#Debuglog.UpdateAttributes}
<p>Updates information about the node.</p>
<ul>
<li><code>attributes</code> the presence of a table field in <code>attributes</code> indicates
the intent to update the corresponding attribute.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.UPDATE_ATTRIBUTES'>Rights.UPDATE_ATTRIBUTES</a> right.</p>
#### Request {#Debuglog.UpdateAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>attributes</code></td>
<td>
<code><a class='link' href='#NodeAttributes'>NodeAttributes</a></code>
</td>
</tr></table>
#### Response {#Debuglog.UpdateAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_UpdateAttributes_Result'>Node_UpdateAttributes_Result</a></code>
</td>
</tr></table>
## Directory {#Directory}
*Defined in [fuchsia.io2/directory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory.fidl;l=9)*
<p>A <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Node'>Node</a> that is capable of containing other nodes.</p>
### AddInotifyFilter {#Directory.AddInotifyFilter}
<p>Adds a new inotify filter for an object relative to this directory object.</p>
<ul>
<li>
<p>'filter` is a mask of different inotify events that need to be watched by the server
for a specific file/directory.</p>
</li>
<li>
<p><code>path</code> may contain multiple segments, separated by &quot;/&quot; characters,
and should never be empty; i.e., &quot;&quot; is an invalid path. Paths should not contain
a leading &quot;/&quot;.</p>
</li>
</ul>
<p>+<code>watch_descriptor</code> is client assigned value to identify a filter.
Server shouldn't trust the client-assigned watch_descriptor. They should just send it
back to the client in the socket.
This value is not used by server, but it is returned back as part of InotifyEvent,
to help the client correlate filter with events on this filter.</p>
<ul>
<li>
<p><code>socket</code> is shared between different filter objects i.e every new filter will
have a different server end of the socket and there will be a single client end per
inotify instance on inotify init.</p>
</li>
<li>
<p><code>controller</code> is the server end of a channel and is per filter in the vnode so that
we can remove the specific inotify filter when the controller is closed by the server
or the client.</p>
<p>Errors are presented as an epitaph on the <code>controller</code> channel.</p>
</li>
</ul>
<ul>
<li>error <code>ZX_ERR_ACCESS_DENIED</code> if the requested rights exceeds
what is allowed.</li>
<li>error <code>ZX_ERR_BAD_PATH</code> if <code>path</code> is invalid.</li>
</ul>
#### Request {#Directory.AddInotifyFilter_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>path</code></td>
<td>
<code><a class='link' href='#Path'>Path</a></code>
</td>
</tr><tr>
<td><code>filter</code></td>
<td>
<code><a class='link' href='#InotifyWatchMask'>InotifyWatchMask</a></code>
</td>
</tr><tr>
<td><code>watch_descriptor</code></td>
<td>
<code>uint32</code>
</td>
</tr><tr>
<td><code>socket</code></td>
<td>
<code>handle&lt;socket&gt;</code>
</td>
</tr></table>
#### Response {#Directory.AddInotifyFilter_Response}
&lt;EMPTY&gt;
### Close {#Directory.Close}
<p>Terminates the connection to the node.</p>
<p>After calling <code>Close</code>, the client must not send any other requests.
The result of <code>Close</code> arrives as an epitaph, where the channel is closed
by the server upon processing this operation.</p>
<p>Closing the client end of the channel should be semantically equivalent
to calling <code>Close</code> without monitoring the status epitaph.</p>
<p>This method does not require any rights.</p>
#### Request {#Directory.Close_Request}
&lt;EMPTY&gt;
### Describe {#Directory.Describe}
<p>Returns extra connection information and auxiliary handles.</p>
<ul>
<li><code>query</code> specifies the fields in <code>ConnectionInfo</code> that the caller is
interested in.</li>
</ul>
<ul>
<li><code>info</code> see <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.</li>
</ul>
<p>When all known bits in <code>query</code> are set, the return value matches
the one from <a class='link' href='#OnConnectionInfo'>OnConnectionInfo</a>, as if the caller requested that event
using <a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>.</p>
<p>If the <code>Describe</code> operation fails, the connection is closed with the
associated error.</p>
<p>This method does not require any rights.</p>
#### Request {#Directory.Describe_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#ConnectionInfoQuery'>ConnectionInfoQuery</a></code>
</td>
</tr></table>
#### Response {#Directory.Describe_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### Enumerate {#Directory.Enumerate}
<p>Initiates a directory listing operation over the input channel,
starting at seek offset 0.</p>
<p>This method requires the <a class='link' href='#Rights.ENUMERATE'>Rights.ENUMERATE</a> right. If this right is
absent, <code>iterator</code> will be closed with a <code>ZX_ERR_ACCESS_DENIED</code> epitaph.</p>
#### Request {#Directory.Enumerate_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#DirectoryEnumerateOptions'>DirectoryEnumerateOptions</a></code>
</td>
</tr><tr>
<td><code>iterator</code></td>
<td>
<code>request&lt;<a class='link' href='#DirectoryIterator'>DirectoryIterator</a>&gt;</code>
</td>
</tr></table>
### GetAttributes {#Directory.GetAttributes}
<p>Acquires information about the node.</p>
<p>The attributes of a node should be stable, independent of the
specific protocol used to access it.</p>
<ul>
<li><code>query</code> a bit-mask specifying which attributes to fetch. The server
should not return more than necessary.</li>
</ul>
<ul>
<li><code>attributes</code> the returned attributes.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.GET_ATTRIBUTES'>Rights.GET_ATTRIBUTES</a> right.</p>
#### Request {#Directory.GetAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#NodeAttributesQuery'>NodeAttributesQuery</a></code>
</td>
</tr></table>
#### Response {#Directory.GetAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetAttributes_Result'>Node_GetAttributes_Result</a></code>
</td>
</tr></table>
### GetToken {#Directory.GetToken}
<p>Acquires a token which can be used to identify this connection at
a later point in time.</p>
<p>This method does not require any rights. Note that the token identifies
the connection, hence carries the rights information on this connection.</p>
#### Request {#Directory.GetToken_Request}
&lt;EMPTY&gt;
#### Response {#Directory.GetToken_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetToken_Result'>Node_GetToken_Result</a></code>
</td>
</tr></table>
### Link {#Directory.Link}
<p>Creates a link to a node named <code>src</code> by the name <code>dst</code>,
in a directory represented by <code>dst_parent_token</code>.</p>
<p>Directories cannot be linked, to prevent reference cycles.</p>
<p><code>src</code> and <code>dst</code> must be valid node names.
See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Name'>Name</a> for what constitutes a valid name.</p>
<p>This method requires the following rights on both the current
connection, and the connection identified by <code>dst_parent_token</code>:</p>
<ul>
<li>
<p><a class='link' href='#Rights.ENUMERATE'>Rights.ENUMERATE</a></p>
</li>
<li>
<p><a class='link' href='#Rights.MODIFY_DIRECTORY'>Rights.MODIFY_DIRECTORY</a></p>
</li>
<li>
<p>error <code>ZX_ERR_INVALID_ARGS</code> if <code>src</code> or <code>dst</code> is invalid.</p>
</li>
<li>
<p>error <code>ZX_ERR_INVALID_ARGS</code> if <code>src</code> is a directory.</p>
</li>
</ul>
#### Request {#Directory.Link_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>src</code></td>
<td>
<code><a class='link' href='#Name'>Name</a></code>
</td>
</tr><tr>
<td><code>dst_parent_token</code></td>
<td>
<code><a class='link' href='#Token'>Token</a></code>
</td>
</tr><tr>
<td><code>dst</code></td>
<td>
<code><a class='link' href='#Name'>Name</a></code>
</td>
</tr></table>
#### Response {#Directory.Link_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Directory_Link_Result'>Directory_Link_Result</a></code>
</td>
</tr></table>
### OnConnectionInfo {#Directory.OnConnectionInfo}
<p>An event produced eagerly by the server if requested by
<a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>. This event will be the
first message from the server, and is sent exactly once.</p>
<ul>
<li><code>info</code> See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.
All members should be present.</li>
</ul>
<p>Different from <a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#OnOpen'>OnOpen</a>, an error during open/reopen is
always manifested as an epitaph.</p>
#### Response {#Directory.OnConnectionInfo_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### Open {#Directory.Open}
<p>Opens or creates a new node relative to this directory node.</p>
<ul>
<li><code>path</code> identifies the node to open.
If <code>path</code> contains multiple segments, then the directory is traversed,
one segment at a time, relative to the directory represented by this
connection.
See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Path'>Path</a> for what constitutes a valid path.
To open another connection to the current directory, use
<a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Node.Reopen'>Node.Reopen</a> instead.</li>
<li><code>mode</code> controls whether to open existing/create new etc.</li>
<li><code>options</code> additional options applicable to both <code>Open</code> and <code>Reopen</code>,
including negotiating protocol and restricting rights.
See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionOptions'>ConnectionOptions</a>.</li>
<li><code>object_request</code> is the server end of a channel created for the new
connection. The caller may proceed to send messages on the
corresponding client end right away.</li>
</ul>
<p>This method requires the following rights on the current connection:</p>
<ul>
<li><a class='link' href='#Rights.ENUMERATE'>Rights.ENUMERATE</a></li>
<li><a class='link' href='#Rights.TRAVERSE'>Rights.TRAVERSE</a></li>
</ul>
<p>Errors are presented as an epitaph on the <code>object_request</code> channel.</p>
<ul>
<li>error <code>ZX_ERR_ACCESS_DENIED</code> if the requested rights exceeds
what is allowed.</li>
<li>error <code>ZX_ERR_BAD_PATH</code> if <code>path</code> is invalid.</li>
</ul>
#### Request {#Directory.Open_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>path</code></td>
<td>
<code><a class='link' href='#Path'>Path</a></code>
</td>
</tr><tr>
<td><code>mode</code></td>
<td>
<code><a class='link' href='#OpenMode'>OpenMode</a></code>
</td>
</tr><tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ConnectionOptions'>ConnectionOptions</a></code>
</td>
</tr><tr>
<td><code>object_request</code></td>
<td>
<code>handle&lt;channel&gt;</code>
</td>
</tr></table>
### Rename {#Directory.Rename}
<p>Renames a node named <code>src</code> to the name <code>dst</code>, in a directory represented
by <code>dst_parent_token</code>.</p>
<p><code>src</code> and <code>dst</code> must be valid node names.
See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Name'>Name</a> for what constitutes a valid name.</p>
<p>This method requires the following rights on both the current
connection, and the connection identified by <code>dst_parent_token</code>:</p>
<ul>
<li>
<p><a class='link' href='#Rights.ENUMERATE'>Rights.ENUMERATE</a></p>
</li>
<li>
<p><a class='link' href='#Rights.MODIFY_DIRECTORY'>Rights.MODIFY_DIRECTORY</a></p>
</li>
<li>
<p>error <code>ZX_ERR_INVALID_ARGS</code> if <code>src</code> or <code>dst</code> is invalid.</p>
</li>
</ul>
#### Request {#Directory.Rename_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>src</code></td>
<td>
<code><a class='link' href='#Name'>Name</a></code>
</td>
</tr><tr>
<td><code>dst_parent_token</code></td>
<td>
<code><a class='link' href='#Token'>Token</a></code>
</td>
</tr><tr>
<td><code>dst</code></td>
<td>
<code><a class='link' href='#Name'>Name</a></code>
</td>
</tr></table>
#### Response {#Directory.Rename_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Directory_Rename_Result'>Directory_Rename_Result</a></code>
</td>
</tr></table>
### Reopen {#Directory.Reopen}
<p>Creates another connection to the same node.</p>
<ul>
<li><code>options</code> options applicable to both <code>Open</code> and <code>Reopen</code>,
including negotiating protocol and restricting rights.
See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionOptions'>ConnectionOptions</a>.</li>
<li><code>object_request</code> is the server end of a channel created for the new
connection. The caller may proceed to send messages on the
corresponding client end right away.</li>
</ul>
<p>For files, the cloned connection and the original connection have
independent seek offsets.</p>
#### Request {#Directory.Reopen_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ConnectionOptions'>ConnectionOptions</a></code>
</td>
</tr><tr>
<td><code>object_request</code></td>
<td>
<code>handle&lt;channel&gt;</code>
</td>
</tr></table>
### Sync {#Directory.Sync}
<p>Synchronizes updates to the node to the underlying media, if it exists.</p>
<p>This method will return when the filesystem server has flushed the
relevant updates to the underlying media, but does not guarantee the
underlying media has persisted the information, nor that any information
is committed to hardware. Clients may use <code>Sync</code> to ensure ordering
between operations.</p>
<p>This method does not require any rights.</p>
#### Request {#Directory.Sync_Request}
&lt;EMPTY&gt;
#### Response {#Directory.Sync_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_Sync_Result'>Node_Sync_Result</a></code>
</td>
</tr></table>
### Unlink {#Directory.Unlink}
<p>Removes a child node from the this directory's list of entries.</p>
<p>Note: this does not guarantee that the underlying object is destroyed.
Although the link will be removed from the containing directory,
objects with multiple references (such as files which are still open)
will not actually be destroyed until all references are closed.</p>
<ul>
<li>error <code>ZX_ERR_ACCESS_DENIED</code> if the connection does not have
<a class='link' href='#Rights.WRITE_BYTES'>Rights.WRITE_BYTES</a>.</li>
<li>error <code>ZX_ERR_NOT_SUPPORTED</code> if the underlying filesystem does not
support writing.</li>
<li>error <code>ZX_ERR_BAD_PATH</code> if <code>name</code> is invalid.</li>
<li>error <code>ZX_ERR_NOT_EMPTY</code> if <code>name</code> refers to a non-empty directory.</li>
<li>error <code>ZX_ERR_UNAVAILABLE</code> if <code>name</code> refers to a mount point,
containing a remote channel.</li>
<li>error <code>ZX_ERR_NOT_DIR</code> if the options requested a directory but something other than a
directory was found.</li>
</ul>
<p>Other errors may be returned for filesystem-specific reasons.</p>
<p>This method requires the following rights:</p>
<ul>
<li><a class='link' href='#Rights.ENUMERATE'>Rights.ENUMERATE</a></li>
<li><a class='link' href='#Rights.MODIFY_DIRECTORY'>Rights.MODIFY_DIRECTORY</a></li>
</ul>
#### Request {#Directory.Unlink_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='#Name'>Name</a></code>
</td>
</tr><tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#UnlinkOptions'>UnlinkOptions</a></code>
</td>
</tr></table>
#### Response {#Directory.Unlink_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Directory_Unlink_Result'>Directory_Unlink_Result</a></code>
</td>
</tr></table>
### UpdateAttributes {#Directory.UpdateAttributes}
<p>Updates information about the node.</p>
<ul>
<li><code>attributes</code> the presence of a table field in <code>attributes</code> indicates
the intent to update the corresponding attribute.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.UPDATE_ATTRIBUTES'>Rights.UPDATE_ATTRIBUTES</a> right.</p>
#### Request {#Directory.UpdateAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>attributes</code></td>
<td>
<code><a class='link' href='#NodeAttributes'>NodeAttributes</a></code>
</td>
</tr></table>
#### Response {#Directory.UpdateAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_UpdateAttributes_Result'>Node_UpdateAttributes_Result</a></code>
</td>
</tr></table>
### Watch {#Directory.Watch}
<p>Watches a directory, monitoring events for children being added or
removed on the server end of the <code>watcher</code> channel.</p>
<p>Mask specifies a bit mask of events to observe.</p>
<p>This method requires the <a class='link' href='#Rights.ENUMERATE'>Rights.ENUMERATE</a> right. If this right is
absent, <code>watcher</code> will be closed with a <code>ZX_ERR_ACCESS_DENIED</code> epitaph.</p>
#### Request {#Directory.Watch_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>mask</code></td>
<td>
<code><a class='link' href='#DirectoryWatchMask'>DirectoryWatchMask</a></code>
</td>
</tr><tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#DirectoryWatchOptions'>DirectoryWatchOptions</a></code>
</td>
</tr><tr>
<td><code>watcher</code></td>
<td>
<code>request&lt;<a class='link' href='#DirectoryWatcher'>DirectoryWatcher</a>&gt;</code>
</td>
</tr></table>
## DirectoryIterator {#DirectoryIterator}
*Defined in [fuchsia.io2/directory-iterator.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory-iterator.fidl;l=8)*
### GetNext {#DirectoryIterator.GetNext}
<p>Reads a collection of variably sized directory entries into a buffer.</p>
<p>The number of entries in a directory may be very large: akin to
calling read multiple times on a file, directories have a seek
offset which is updated on subsequent calls to <code>Enumerate</code>.
The caller should always use a receiving buffer size as large as the
maximum channel limit.</p>
<p>When the end of iteration is reached, the returned <code>entries</code> vector
will be empty.</p>
<p>This method does not require any rights, as the rights are checked
in the <a class='link' href='#Directory.Enumerate'>Directory.Enumerate</a> call.</p>
#### Request {#DirectoryIterator.GetNext_Request}
&lt;EMPTY&gt;
#### Response {#DirectoryIterator.GetNext_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#DirectoryIterator_GetNext_Result'>DirectoryIterator_GetNext_Result</a></code>
</td>
</tr></table>
## DirectoryWatcher {#DirectoryWatcher}
*Defined in [fuchsia.io2/directory-watcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory-watcher.fidl;l=10)*
<p>DirectoryWatcher transmits messages from a filesystem server about
events happening in the filesystem. Clients can register new watchers
using the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Directory.Watch'>Directory.Watch</a> method, where they can
filter which events they want to receive notifications for.</p>
### GetNext {#DirectoryWatcher.GetNext}
<p>A hanging get to obtain the next batch of events.</p>
<p>The caller should always use a receiving buffer size as large as the
maximum channel limit.</p>
<p>Clients should attempt to maintain one in-flight <code>GetNext</code> call as much
as possible. If <code>GetNext</code> is not constantly polled, the filesystem
server might hit an upper limit on the number of buffered events,
resulting in dropping. Should this happen, the connection will be closed
with a <code>ZX_ERR_IO_OVERRUN</code> epitaph.</p>
<p>When the watched directory is deleted, this connection will be closed
with a <code>ZX_ERR_UNAVAILABLE</code> epitaph.
When the filesystem server is dying, this connection will be closed
with a <code>ZX_ERR_PEER_CLOSED</code> epitaph.</p>
#### Request {#DirectoryWatcher.GetNext_Request}
&lt;EMPTY&gt;
#### Response {#DirectoryWatcher.GetNext_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>events</code></td>
<td>
<code>vector&lt;<a class='link' href='#DirectoryWatchedEvent'>DirectoryWatchedEvent</a>&gt;[8192]</code>
</td>
</tr></table>
## File {#File}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=20)*
<p>A <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Node'>Node</a> which contains a sequence of bytes of definite
length.</p>
### AdvisoryLock {#File.AdvisoryLock}
<p>Acquires an advisory lock on the underlying file.</p>
<p>The lock lasts until either this connection is closed or
this method is called with |AdvisoryLockType.UNLOCK| to release the lock
explicitly.</p>
<p>Advisory locks are purely advisory. They do not prevent actual read or
write operations from occurring on the file, either through this
connection or through other connections.</p>
<p>This method requires the following rights:</p>
<ul>
<li><a class='link' href='#Rights.READ_BYTES'>Rights.READ_BYTES</a> if <code>request.type</code> is <a class='link' href='#AdvisoryLockType.READ'>AdvisoryLockType.READ</a>.</li>
<li><a class='link' href='#Rights.WRITE_BYTES'>Rights.WRITE_BYTES</a> if <code>request.type</code> is
<a class='link' href='#AdvisoryLockType.WRITE'>AdvisoryLockType.WRITE</a>.</li>
</ul>
<h1>Errors</h1>
<ul>
<li><code>ZX_ERR_BAD_STATE</code> The specified type of lock cannot be acquired. For
example, another connection might hold a conflicting lock type.</li>
<li><code>ZX_ERR_NOT_SUPPORTED</code> This file does not support advisory locking.</li>
<li><code>ZX_ERR_ACCESS_DENIED</code> This connection does not have sufficient rights
to acquire the given type of lock.</li>
</ul>
#### Request {#File.AdvisoryLock_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>request</code></td>
<td>
<code><a class='link' href='#AdvisoryLockRequest'>AdvisoryLockRequest</a></code>
</td>
</tr></table>
#### Response {#File.AdvisoryLock_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#AdvisoryLocking_AdvisoryLock_Result'>AdvisoryLocking_AdvisoryLock_Result</a></code>
</td>
</tr></table>
### Close {#File.Close}
<p>Terminates the connection to the node.</p>
<p>After calling <code>Close</code>, the client must not send any other requests.
The result of <code>Close</code> arrives as an epitaph, where the channel is closed
by the server upon processing this operation.</p>
<p>Closing the client end of the channel should be semantically equivalent
to calling <code>Close</code> without monitoring the status epitaph.</p>
<p>This method does not require any rights.</p>
#### Request {#File.Close_Request}
&lt;EMPTY&gt;
### Describe {#File.Describe}
<p>Returns extra connection information and auxiliary handles.</p>
<ul>
<li><code>query</code> specifies the fields in <code>ConnectionInfo</code> that the caller is
interested in.</li>
</ul>
<ul>
<li><code>info</code> see <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.</li>
</ul>
<p>When all known bits in <code>query</code> are set, the return value matches
the one from <a class='link' href='#OnConnectionInfo'>OnConnectionInfo</a>, as if the caller requested that event
using <a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>.</p>
<p>If the <code>Describe</code> operation fails, the connection is closed with the
associated error.</p>
<p>This method does not require any rights.</p>
#### Request {#File.Describe_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#ConnectionInfoQuery'>ConnectionInfoQuery</a></code>
</td>
</tr></table>
#### Response {#File.Describe_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### GetAttributes {#File.GetAttributes}
<p>Acquires information about the node.</p>
<p>The attributes of a node should be stable, independent of the
specific protocol used to access it.</p>
<ul>
<li><code>query</code> a bit-mask specifying which attributes to fetch. The server
should not return more than necessary.</li>
</ul>
<ul>
<li><code>attributes</code> the returned attributes.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.GET_ATTRIBUTES'>Rights.GET_ATTRIBUTES</a> right.</p>
#### Request {#File.GetAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#NodeAttributesQuery'>NodeAttributesQuery</a></code>
</td>
</tr></table>
#### Response {#File.GetAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetAttributes_Result'>Node_GetAttributes_Result</a></code>
</td>
</tr></table>
### GetMemRange {#File.GetMemRange}
<p>Acquires a <a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Range'>Range</a> representing this file, if
there is one, with the requested access rights.</p>
<ul>
<li>request <code>flags</code> a <a class='link' href='#VmoFlags'>VmoFlags</a> indicating the desired mode of access.</li>
</ul>
<ul>
<li>response <code>buffer</code> the requested <a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Range'>Range</a>.</li>
</ul>
<ul>
<li>error a <a class='link' href='#zx.status'>zx.status</a> value indicating the failure.</li>
</ul>
<p>This method requires the following rights:</p>
<ul>
<li><a class='link' href='#Rights.READ_BYTES'>Rights.READ_BYTES</a> if <code>flags</code> includes <a class='link' href='#VmoFlags.READ'>VmoFlags.READ</a>.</li>
<li><a class='link' href='#Rights.WRITE_BYTES'>Rights.WRITE_BYTES</a> if <code>flags</code> includes <a class='link' href='#VmoFlags.WRITE'>VmoFlags.WRITE</a>.</li>
<li><a class='link' href='#Rights.EXECUTE'>Rights.EXECUTE</a> if <code>flags</code> includes <a class='link' href='#VmoFlags.EXECUTE'>VmoFlags.EXECUTE</a>.</li>
</ul>
#### Request {#File.GetMemRange_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>flags</code></td>
<td>
<code><a class='link' href='#VmoFlags'>VmoFlags</a></code>
</td>
</tr></table>
#### Response {#File.GetMemRange_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#File_GetMemRange_Result'>File_GetMemRange_Result</a></code>
</td>
</tr></table>
### GetToken {#File.GetToken}
<p>Acquires a token which can be used to identify this connection at
a later point in time.</p>
<p>This method does not require any rights. Note that the token identifies
the connection, hence carries the rights information on this connection.</p>
#### Request {#File.GetToken_Request}
&lt;EMPTY&gt;
#### Response {#File.GetToken_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetToken_Result'>Node_GetToken_Result</a></code>
</td>
</tr></table>
### OnConnectionInfo {#File.OnConnectionInfo}
<p>An event produced eagerly by the server if requested by
<a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>. This event will be the
first message from the server, and is sent exactly once.</p>
<ul>
<li><code>info</code> See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.
All members should be present.</li>
</ul>
<p>Different from <a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#OnOpen'>OnOpen</a>, an error during open/reopen is
always manifested as an epitaph.</p>
#### Response {#File.OnConnectionInfo_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### Read {#File.Read}
<p>Reads up to 'count' bytes at the seek offset.
The seek offset is moved forward by the number of bytes read.</p>
<h2>Invariants</h2>
<ul>
<li>The returned <code>data.length</code> will never be greater than <code>count</code>.</li>
<li>If <code>data.length</code> is less than <code>count</code>, it means that the seek offset
has reached the end of file as part of this operation.</li>
<li>If <code>data.length</code> is zero while <code>count</code> is not, it means that the
seek offset is already at or beyond the end of file, and no data could
be read.</li>
<li>If <code>count</code> is zero, the server should perform all the checks ensuring
read access without actually read anything, and return an empty
<code>data</code> vector.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.READ_BYTES'>Rights.READ_BYTES</a> right.</p>
<p>Returns <code>ZX_ERR_OUT_OF_RANGE</code> if <code>count</code> is greater than <code>MAX_TRANSFER_SIZE</code>.</p>
#### Request {#File.Read_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>count</code></td>
<td>
<code>uint64</code>
</td>
</tr></table>
#### Response {#File.Read_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#File_Read_Result'>File_Read_Result</a></code>
</td>
</tr></table>
### ReadAt {#File.ReadAt}
<p>Reads up to 'count' bytes at the provided offset.
Does not affect the seek offset.</p>
<h2>Invariants</h2>
<ul>
<li>The returned <code>data.length</code> will never be greater than <code>count</code>.</li>
<li>If <code>data.length</code> is less than <code>count</code>, it means that <code>ReadAt</code> has hit
the end of file as part of this operation.</li>
<li>If <code>data.length</code> is zero while <code>count</code> is not, it means that <code>offset</code>
is at or past the end of file, and no data can be read.</li>
<li>If <code>count</code> is zero, the server should perform all the checks ensuring
read access without actually reading anything, and return an empty
<code>data</code> vector.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.READ_BYTES'>Rights.READ_BYTES</a> right.</p>
<p>Returns <code>ZX_ERR_OUT_OF_RANGE</code> if <code>count</code> is greater than <code>MAX_TRANSFER_SIZE</code>.</p>
#### Request {#File.ReadAt_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>count</code></td>
<td>
<code>uint64</code>
</td>
</tr><tr>
<td><code>offset</code></td>
<td>
<code>uint64</code>
</td>
</tr></table>
#### Response {#File.ReadAt_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#File_ReadAt_Result'>File_ReadAt_Result</a></code>
</td>
</tr></table>
### Reopen {#File.Reopen}
<p>Creates another connection to the same node.</p>
<ul>
<li><code>options</code> options applicable to both <code>Open</code> and <code>Reopen</code>,
including negotiating protocol and restricting rights.
See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionOptions'>ConnectionOptions</a>.</li>
<li><code>object_request</code> is the server end of a channel created for the new
connection. The caller may proceed to send messages on the
corresponding client end right away.</li>
</ul>
<p>For files, the cloned connection and the original connection have
independent seek offsets.</p>
#### Request {#File.Reopen_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ConnectionOptions'>ConnectionOptions</a></code>
</td>
</tr><tr>
<td><code>object_request</code></td>
<td>
<code>handle&lt;channel&gt;</code>
</td>
</tr></table>
### Resize {#File.Resize}
<p>Shrinks or grows the file size to 'length' bytes.</p>
<p>If file size is reduced by this operation, the extra trailing data'
is discarded.
If file size is increased by this operation, the extended area appears
as if it was zeroed.</p>
<p>This method requires the <a class='link' href='#Rights.WRITE_BYTES'>Rights.WRITE_BYTES</a> right.</p>
#### Request {#File.Resize_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>length</code></td>
<td>
<code>uint64</code>
</td>
</tr></table>
#### Response {#File.Resize_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#File_Resize_Result'>File_Resize_Result</a></code>
</td>
</tr></table>
### Seek {#File.Seek}
<p>Moves the offset at which the next invocation of <a class='link' href='#Read'>Read</a> or <a class='link' href='#Write'>Write</a>
will occur. The seek offset is specific to each file connection.</p>
<ul>
<li>request <code>origin</code> the reference point where <code>offset</code> will be based on.</li>
<li>request <code>offset</code> the number of bytes to seek.</li>
</ul>
<ul>
<li>response <code>offset_from_start</code> the adjusted seek offset, from the start
of the file.</li>
</ul>
<p>This method does not require any rights.</p>
#### Request {#File.Seek_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>origin</code></td>
<td>
<code><a class='link' href='#SeekOrigin'>SeekOrigin</a></code>
</td>
</tr><tr>
<td><code>offset</code></td>
<td>
<code>int64</code>
</td>
</tr></table>
#### Response {#File.Seek_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#File_Seek_Result'>File_Seek_Result</a></code>
</td>
</tr></table>
### Sync {#File.Sync}
<p>Synchronizes updates to the node to the underlying media, if it exists.</p>
<p>This method will return when the filesystem server has flushed the
relevant updates to the underlying media, but does not guarantee the
underlying media has persisted the information, nor that any information
is committed to hardware. Clients may use <code>Sync</code> to ensure ordering
between operations.</p>
<p>This method does not require any rights.</p>
#### Request {#File.Sync_Request}
&lt;EMPTY&gt;
#### Response {#File.Sync_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_Sync_Result'>Node_Sync_Result</a></code>
</td>
</tr></table>
### UpdateAttributes {#File.UpdateAttributes}
<p>Updates information about the node.</p>
<ul>
<li><code>attributes</code> the presence of a table field in <code>attributes</code> indicates
the intent to update the corresponding attribute.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.UPDATE_ATTRIBUTES'>Rights.UPDATE_ATTRIBUTES</a> right.</p>
#### Request {#File.UpdateAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>attributes</code></td>
<td>
<code><a class='link' href='#NodeAttributes'>NodeAttributes</a></code>
</td>
</tr></table>
#### Response {#File.UpdateAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_UpdateAttributes_Result'>Node_UpdateAttributes_Result</a></code>
</td>
</tr></table>
### Write {#File.Write}
<p>Writes data at the seek offset.
The seek offset is moved forward by the number of bytes written.
If the file is in append mode, the seek offset is first set to the end
of the file, followed by the write, in one atomic step.</p>
<p>The file size may grow if the seek offset plus <code>data.length</code> is beyond
the current end of file.</p>
<ul>
<li>request <code>data</code> the byte buffer to write to the file.</li>
</ul>
<ul>
<li>response <code>actual_count</code> the number of bytes written.</li>
</ul>
<h2>Invariants</h2>
<ul>
<li>The returned <code>actual_count</code> will never be greater than <code>data.length</code>.</li>
<li>If the server is unable to write all the data due to e.g. not enough
space, <code>actual_count</code> may be less than <code>data.length</code>.</li>
<li>If <code>data.length</code> is zero, the server should perform all the checks
ensuring write access without mutating the file. The seek offset
is still updated if in append mode.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.WRITE_BYTES'>Rights.WRITE_BYTES</a> right.</p>
#### Request {#File.Write_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>data</code></td>
<td>
<code><a class='link' href='#Transfer'>Transfer</a></code>
</td>
</tr></table>
#### Response {#File.Write_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#File_Write_Result'>File_Write_Result</a></code>
</td>
</tr></table>
### WriteAt {#File.WriteAt}
<p>Writes data at the provided offset.
Does not affect the seek offset.</p>
<p>The file size may grow if <code>offset</code> plus <code>data.length</code> is past the
current end of file.</p>
<ul>
<li>request <code>data</code> the byte buffer to write to the file.</li>
<li>request <code>offset</code> the offset from start of the file to begin writing.</li>
</ul>
<ul>
<li>response <code>actual_count</code> the number of bytes written.</li>
</ul>
<h2>Invariants</h2>
<ul>
<li>The returned <code>actual_count</code> will never be greater than <code>data.length</code>.</li>
<li>If the server is unable to write all the data due to e.g. not enough
space, <code>actual_count</code> may be less than <code>data.length</code>.</li>
<li>If <code>data.length</code> is zero, the server should perform all the checks
ensuring write access without mutating the file.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.WRITE_BYTES'>Rights.WRITE_BYTES</a> right.</p>
#### Request {#File.WriteAt_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>data</code></td>
<td>
<code><a class='link' href='#Transfer'>Transfer</a></code>
</td>
</tr><tr>
<td><code>offset</code></td>
<td>
<code>uint64</code>
</td>
</tr></table>
#### Response {#File.WriteAt_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#File_WriteAt_Result'>File_WriteAt_Result</a></code>
</td>
</tr></table>
## Inotifier {#Inotifier}
*Defined in [fuchsia.io2/inotify.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/inotify.fidl;l=12)*
<p>Inotifier implements the linux Inotify functionality.
It provides a mechanism for monitoring filesystem
events. Inotify can be used to monitor individual files, or to
monitor directories. When a directory is monitored, inotify will
return events for the directory itself, and for files inside the
directory.</p>
## Memory {#Memory}
*Defined in [fuchsia.io2/memory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/memory.fidl;l=12)*
<p>A file-like node backed by a VMO.
No memory-specific methods are provided by this protocol.
The client should access it via the the <a class='link' href='#MemoryInfo.buffer'>MemoryInfo.buffer</a> object in
<a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Representation'>Representation</a>.</p>
### Close {#Memory.Close}
<p>Terminates the connection to the node.</p>
<p>After calling <code>Close</code>, the client must not send any other requests.
The result of <code>Close</code> arrives as an epitaph, where the channel is closed
by the server upon processing this operation.</p>
<p>Closing the client end of the channel should be semantically equivalent
to calling <code>Close</code> without monitoring the status epitaph.</p>
<p>This method does not require any rights.</p>
#### Request {#Memory.Close_Request}
&lt;EMPTY&gt;
### Describe {#Memory.Describe}
<p>Returns extra connection information and auxiliary handles.</p>
<ul>
<li><code>query</code> specifies the fields in <code>ConnectionInfo</code> that the caller is
interested in.</li>
</ul>
<ul>
<li><code>info</code> see <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.</li>
</ul>
<p>When all known bits in <code>query</code> are set, the return value matches
the one from <a class='link' href='#OnConnectionInfo'>OnConnectionInfo</a>, as if the caller requested that event
using <a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>.</p>
<p>If the <code>Describe</code> operation fails, the connection is closed with the
associated error.</p>
<p>This method does not require any rights.</p>
#### Request {#Memory.Describe_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#ConnectionInfoQuery'>ConnectionInfoQuery</a></code>
</td>
</tr></table>
#### Response {#Memory.Describe_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### GetAttributes {#Memory.GetAttributes}
<p>Acquires information about the node.</p>
<p>The attributes of a node should be stable, independent of the
specific protocol used to access it.</p>
<ul>
<li><code>query</code> a bit-mask specifying which attributes to fetch. The server
should not return more than necessary.</li>
</ul>
<ul>
<li><code>attributes</code> the returned attributes.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.GET_ATTRIBUTES'>Rights.GET_ATTRIBUTES</a> right.</p>
#### Request {#Memory.GetAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#NodeAttributesQuery'>NodeAttributesQuery</a></code>
</td>
</tr></table>
#### Response {#Memory.GetAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetAttributes_Result'>Node_GetAttributes_Result</a></code>
</td>
</tr></table>
### GetToken {#Memory.GetToken}
<p>Acquires a token which can be used to identify this connection at
a later point in time.</p>
<p>This method does not require any rights. Note that the token identifies
the connection, hence carries the rights information on this connection.</p>
#### Request {#Memory.GetToken_Request}
&lt;EMPTY&gt;
#### Response {#Memory.GetToken_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetToken_Result'>Node_GetToken_Result</a></code>
</td>
</tr></table>
### OnConnectionInfo {#Memory.OnConnectionInfo}
<p>An event produced eagerly by the server if requested by
<a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>. This event will be the
first message from the server, and is sent exactly once.</p>
<ul>
<li><code>info</code> See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.
All members should be present.</li>
</ul>
<p>Different from <a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#OnOpen'>OnOpen</a>, an error during open/reopen is
always manifested as an epitaph.</p>
#### Response {#Memory.OnConnectionInfo_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### Reopen {#Memory.Reopen}
<p>Creates another connection to the same node.</p>
<ul>
<li><code>options</code> options applicable to both <code>Open</code> and <code>Reopen</code>,
including negotiating protocol and restricting rights.
See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionOptions'>ConnectionOptions</a>.</li>
<li><code>object_request</code> is the server end of a channel created for the new
connection. The caller may proceed to send messages on the
corresponding client end right away.</li>
</ul>
<p>For files, the cloned connection and the original connection have
independent seek offsets.</p>
#### Request {#Memory.Reopen_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ConnectionOptions'>ConnectionOptions</a></code>
</td>
</tr><tr>
<td><code>object_request</code></td>
<td>
<code>handle&lt;channel&gt;</code>
</td>
</tr></table>
### Sync {#Memory.Sync}
<p>Synchronizes updates to the node to the underlying media, if it exists.</p>
<p>This method will return when the filesystem server has flushed the
relevant updates to the underlying media, but does not guarantee the
underlying media has persisted the information, nor that any information
is committed to hardware. Clients may use <code>Sync</code> to ensure ordering
between operations.</p>
<p>This method does not require any rights.</p>
#### Request {#Memory.Sync_Request}
&lt;EMPTY&gt;
#### Response {#Memory.Sync_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_Sync_Result'>Node_Sync_Result</a></code>
</td>
</tr></table>
### UpdateAttributes {#Memory.UpdateAttributes}
<p>Updates information about the node.</p>
<ul>
<li><code>attributes</code> the presence of a table field in <code>attributes</code> indicates
the intent to update the corresponding attribute.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.UPDATE_ATTRIBUTES'>Rights.UPDATE_ATTRIBUTES</a> right.</p>
#### Request {#Memory.UpdateAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>attributes</code></td>
<td>
<code><a class='link' href='#NodeAttributes'>NodeAttributes</a></code>
</td>
</tr></table>
#### Response {#Memory.UpdateAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_UpdateAttributes_Result'>Node_UpdateAttributes_Result</a></code>
</td>
</tr></table>
## Node {#Node}
*Defined in [fuchsia.io2/node.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/node.fidl;l=10)*
<p>Node defines the minimal protocol for entities which can be accessed
in a filesystem.</p>
### Close {#Node.Close}
<p>Terminates the connection to the node.</p>
<p>After calling <code>Close</code>, the client must not send any other requests.
The result of <code>Close</code> arrives as an epitaph, where the channel is closed
by the server upon processing this operation.</p>
<p>Closing the client end of the channel should be semantically equivalent
to calling <code>Close</code> without monitoring the status epitaph.</p>
<p>This method does not require any rights.</p>
#### Request {#Node.Close_Request}
&lt;EMPTY&gt;
### Describe {#Node.Describe}
<p>Returns extra connection information and auxiliary handles.</p>
<ul>
<li><code>query</code> specifies the fields in <code>ConnectionInfo</code> that the caller is
interested in.</li>
</ul>
<ul>
<li><code>info</code> see <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.</li>
</ul>
<p>When all known bits in <code>query</code> are set, the return value matches
the one from <a class='link' href='#OnConnectionInfo'>OnConnectionInfo</a>, as if the caller requested that event
using <a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>.</p>
<p>If the <code>Describe</code> operation fails, the connection is closed with the
associated error.</p>
<p>This method does not require any rights.</p>
#### Request {#Node.Describe_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#ConnectionInfoQuery'>ConnectionInfoQuery</a></code>
</td>
</tr></table>
#### Response {#Node.Describe_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### GetAttributes {#Node.GetAttributes}
<p>Acquires information about the node.</p>
<p>The attributes of a node should be stable, independent of the
specific protocol used to access it.</p>
<ul>
<li><code>query</code> a bit-mask specifying which attributes to fetch. The server
should not return more than necessary.</li>
</ul>
<ul>
<li><code>attributes</code> the returned attributes.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.GET_ATTRIBUTES'>Rights.GET_ATTRIBUTES</a> right.</p>
#### Request {#Node.GetAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#NodeAttributesQuery'>NodeAttributesQuery</a></code>
</td>
</tr></table>
#### Response {#Node.GetAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetAttributes_Result'>Node_GetAttributes_Result</a></code>
</td>
</tr></table>
### GetToken {#Node.GetToken}
<p>Acquires a token which can be used to identify this connection at
a later point in time.</p>
<p>This method does not require any rights. Note that the token identifies
the connection, hence carries the rights information on this connection.</p>
#### Request {#Node.GetToken_Request}
&lt;EMPTY&gt;
#### Response {#Node.GetToken_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetToken_Result'>Node_GetToken_Result</a></code>
</td>
</tr></table>
### OnConnectionInfo {#Node.OnConnectionInfo}
<p>An event produced eagerly by the server if requested by
<a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>. This event will be the
first message from the server, and is sent exactly once.</p>
<ul>
<li><code>info</code> See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.
All members should be present.</li>
</ul>
<p>Different from <a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#OnOpen'>OnOpen</a>, an error during open/reopen is
always manifested as an epitaph.</p>
#### Response {#Node.OnConnectionInfo_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### Reopen {#Node.Reopen}
<p>Creates another connection to the same node.</p>
<ul>
<li><code>options</code> options applicable to both <code>Open</code> and <code>Reopen</code>,
including negotiating protocol and restricting rights.
See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionOptions'>ConnectionOptions</a>.</li>
<li><code>object_request</code> is the server end of a channel created for the new
connection. The caller may proceed to send messages on the
corresponding client end right away.</li>
</ul>
<p>For files, the cloned connection and the original connection have
independent seek offsets.</p>
#### Request {#Node.Reopen_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ConnectionOptions'>ConnectionOptions</a></code>
</td>
</tr><tr>
<td><code>object_request</code></td>
<td>
<code>handle&lt;channel&gt;</code>
</td>
</tr></table>
### Sync {#Node.Sync}
<p>Synchronizes updates to the node to the underlying media, if it exists.</p>
<p>This method will return when the filesystem server has flushed the
relevant updates to the underlying media, but does not guarantee the
underlying media has persisted the information, nor that any information
is committed to hardware. Clients may use <code>Sync</code> to ensure ordering
between operations.</p>
<p>This method does not require any rights.</p>
#### Request {#Node.Sync_Request}
&lt;EMPTY&gt;
#### Response {#Node.Sync_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_Sync_Result'>Node_Sync_Result</a></code>
</td>
</tr></table>
### UpdateAttributes {#Node.UpdateAttributes}
<p>Updates information about the node.</p>
<ul>
<li><code>attributes</code> the presence of a table field in <code>attributes</code> indicates
the intent to update the corresponding attribute.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.UPDATE_ATTRIBUTES'>Rights.UPDATE_ATTRIBUTES</a> right.</p>
#### Request {#Node.UpdateAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>attributes</code></td>
<td>
<code><a class='link' href='#NodeAttributes'>NodeAttributes</a></code>
</td>
</tr></table>
#### Response {#Node.UpdateAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_UpdateAttributes_Result'>Node_UpdateAttributes_Result</a></code>
</td>
</tr></table>
## Pipe {#Pipe}
*Defined in [fuchsia.io2/pipe.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/pipe.fidl;l=12)*
<p>A node for streaming unstructured data.
No pipe-specific methods are provided by this protocol. The client should
access the pipe via the socket object returned from the <code>PipeInfo</code> member
in <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Representation'>Representation</a>.</p>
### Close {#Pipe.Close}
<p>Terminates the connection to the node.</p>
<p>After calling <code>Close</code>, the client must not send any other requests.
The result of <code>Close</code> arrives as an epitaph, where the channel is closed
by the server upon processing this operation.</p>
<p>Closing the client end of the channel should be semantically equivalent
to calling <code>Close</code> without monitoring the status epitaph.</p>
<p>This method does not require any rights.</p>
#### Request {#Pipe.Close_Request}
&lt;EMPTY&gt;
### Describe {#Pipe.Describe}
<p>Returns extra connection information and auxiliary handles.</p>
<ul>
<li><code>query</code> specifies the fields in <code>ConnectionInfo</code> that the caller is
interested in.</li>
</ul>
<ul>
<li><code>info</code> see <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.</li>
</ul>
<p>When all known bits in <code>query</code> are set, the return value matches
the one from <a class='link' href='#OnConnectionInfo'>OnConnectionInfo</a>, as if the caller requested that event
using <a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>.</p>
<p>If the <code>Describe</code> operation fails, the connection is closed with the
associated error.</p>
<p>This method does not require any rights.</p>
#### Request {#Pipe.Describe_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#ConnectionInfoQuery'>ConnectionInfoQuery</a></code>
</td>
</tr></table>
#### Response {#Pipe.Describe_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### GetAttributes {#Pipe.GetAttributes}
<p>Acquires information about the node.</p>
<p>The attributes of a node should be stable, independent of the
specific protocol used to access it.</p>
<ul>
<li><code>query</code> a bit-mask specifying which attributes to fetch. The server
should not return more than necessary.</li>
</ul>
<ul>
<li><code>attributes</code> the returned attributes.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.GET_ATTRIBUTES'>Rights.GET_ATTRIBUTES</a> right.</p>
#### Request {#Pipe.GetAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>query</code></td>
<td>
<code><a class='link' href='#NodeAttributesQuery'>NodeAttributesQuery</a></code>
</td>
</tr></table>
#### Response {#Pipe.GetAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetAttributes_Result'>Node_GetAttributes_Result</a></code>
</td>
</tr></table>
### GetToken {#Pipe.GetToken}
<p>Acquires a token which can be used to identify this connection at
a later point in time.</p>
<p>This method does not require any rights. Note that the token identifies
the connection, hence carries the rights information on this connection.</p>
#### Request {#Pipe.GetToken_Request}
&lt;EMPTY&gt;
#### Response {#Pipe.GetToken_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_GetToken_Result'>Node_GetToken_Result</a></code>
</td>
</tr></table>
### OnConnectionInfo {#Pipe.OnConnectionInfo}
<p>An event produced eagerly by the server if requested by
<a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a>. This event will be the
first message from the server, and is sent exactly once.</p>
<ul>
<li><code>info</code> See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionInfo'>ConnectionInfo</a> for details on the fields.
All members should be present.</li>
</ul>
<p>Different from <a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#OnOpen'>OnOpen</a>, an error during open/reopen is
always manifested as an epitaph.</p>
#### Response {#Pipe.OnConnectionInfo_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#ConnectionInfo'>ConnectionInfo</a></code>
</td>
</tr></table>
### Reopen {#Pipe.Reopen}
<p>Creates another connection to the same node.</p>
<ul>
<li><code>options</code> options applicable to both <code>Open</code> and <code>Reopen</code>,
including negotiating protocol and restricting rights.
See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#ConnectionOptions'>ConnectionOptions</a>.</li>
<li><code>object_request</code> is the server end of a channel created for the new
connection. The caller may proceed to send messages on the
corresponding client end right away.</li>
</ul>
<p>For files, the cloned connection and the original connection have
independent seek offsets.</p>
#### Request {#Pipe.Reopen_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ConnectionOptions'>ConnectionOptions</a></code>
</td>
</tr><tr>
<td><code>object_request</code></td>
<td>
<code>handle&lt;channel&gt;</code>
</td>
</tr></table>
### Sync {#Pipe.Sync}
<p>Synchronizes updates to the node to the underlying media, if it exists.</p>
<p>This method will return when the filesystem server has flushed the
relevant updates to the underlying media, but does not guarantee the
underlying media has persisted the information, nor that any information
is committed to hardware. Clients may use <code>Sync</code> to ensure ordering
between operations.</p>
<p>This method does not require any rights.</p>
#### Request {#Pipe.Sync_Request}
&lt;EMPTY&gt;
#### Response {#Pipe.Sync_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_Sync_Result'>Node_Sync_Result</a></code>
</td>
</tr></table>
### UpdateAttributes {#Pipe.UpdateAttributes}
<p>Updates information about the node.</p>
<ul>
<li><code>attributes</code> the presence of a table field in <code>attributes</code> indicates
the intent to update the corresponding attribute.</li>
</ul>
<p>This method requires the <a class='link' href='#Rights.UPDATE_ATTRIBUTES'>Rights.UPDATE_ATTRIBUTES</a> right.</p>
#### Request {#Pipe.UpdateAttributes_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>attributes</code></td>
<td>
<code><a class='link' href='#NodeAttributes'>NodeAttributes</a></code>
</td>
</tr></table>
#### Response {#Pipe.UpdateAttributes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Node_UpdateAttributes_Result'>Node_UpdateAttributes_Result</a></code>
</td>
</tr></table>
## **STRUCTS**
### AdvisoryLockRange {#AdvisoryLockRange data-text="AdvisoryLockRange"}
*Defined in [fuchsia.io2/locking.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/locking.fidl;l=70)*
<p>A range within a file associated with an advisory lock.</p>
<p>The range can extend beyond the end of the file but cannot extend beyond
the beginning of the file.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="AdvisoryLockRange.origin">
<td><code>origin</code></td>
<td>
<code><a class='link' href='#SeekOrigin'>SeekOrigin</a></code>
</td>
<td><p>The location in the file from which <a class='link' href='#offset'>offset</a> is computed.</p>
</td>
<td>No default</td>
</tr><tr id="AdvisoryLockRange.offset">
<td><code>offset</code></td>
<td>
<code>int64</code>
</td>
<td><p>The start of the byte range, expressed as an offset from <a class='link' href='#origin'>origin</a>.
Cannot be negative if <a class='link' href='#origin'>origin</a> is <a class='link' href='#SeekOrigin.START'>SeekOrigin.START</a>.</p>
</td>
<td>No default</td>
</tr><tr id="AdvisoryLockRange.length">
<td><code>length</code></td>
<td>
<code>int64</code>
</td>
<td><p>The length of the byte range in bytes.</p>
<p>If the length is zero, then the byte range exends until the end of the
file, regardless of how large the file becomes.</p>
<p>If the length is negative, the byte range includes the bytes <code>offset</code> +
<code>length</code> up to, and including, <code>offset</code> - 1, provided this range does
not extend beyond the beginning of the file.</p>
</td>
<td>No default</td>
</tr>
</table>
### AdvisoryLocking_AdvisoryLock_Response {#AdvisoryLocking_AdvisoryLock_Response data-text="AdvisoryLocking_AdvisoryLock_Response"}
*Defined in [fuchsia.io2/locking.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/locking.fidl;l=47)*
&lt;EMPTY&gt;
### DirectoryIterator_GetNext_Response {#DirectoryIterator_GetNext_Response data-text="DirectoryIterator_GetNext_Response"}
*Defined in [fuchsia.io2/directory-iterator.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory-iterator.fidl;l=22)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="DirectoryIterator_GetNext_Response.entries">
<td><code>entries</code></td>
<td>
<code>vector&lt;<a class='link' href='#DirectoryEntry'>DirectoryEntry</a>&gt;[8192]</code>
</td>
<td>
</td>
<td>No default</td>
</tr>
</table>
### Directory_Link_Response {#Directory_Link_Response data-text="Directory_Link_Response"}
*Defined in [fuchsia.io2/directory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory.fidl;l=158)*
&lt;EMPTY&gt;
### Directory_Rename_Response {#Directory_Rename_Response data-text="Directory_Rename_Response"}
*Defined in [fuchsia.io2/directory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory.fidl;l=136)*
&lt;EMPTY&gt;
### Directory_Unlink_Response {#Directory_Unlink_Response data-text="Directory_Unlink_Response"}
*Defined in [fuchsia.io2/directory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory.fidl;l=107)*
&lt;EMPTY&gt;
### File_GetMemRange_Response [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#File_GetMemRange_Response data-text="File_GetMemRange_Response"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=167)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="File_GetMemRange_Response.buffer">
<td><code>buffer</code></td>
<td>
<code><a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Range'>Range</a></code>
</td>
<td>
</td>
<td>No default</td>
</tr>
</table>
### File_ReadAt_Response {#File_ReadAt_Response data-text="File_ReadAt_Response"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=111)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="File_ReadAt_Response.data">
<td><code>data</code></td>
<td>
<code><a class='link' href='#Transfer'>Transfer</a></code>
</td>
<td>
</td>
<td>No default</td>
</tr>
</table>
### File_Read_Response {#File_Read_Response data-text="File_Read_Response"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=60)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="File_Read_Response.data">
<td><code>data</code></td>
<td>
<code><a class='link' href='#Transfer'>Transfer</a></code>
</td>
<td>
</td>
<td>No default</td>
</tr>
</table>
### File_Resize_Response {#File_Resize_Response data-text="File_Resize_Response"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=151)*
&lt;EMPTY&gt;
### File_Seek_Response {#File_Seek_Response data-text="File_Seek_Response"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=36)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="File_Seek_Response.offset_from_start">
<td><code>offset_from_start</code></td>
<td>
<code>uint64</code>
</td>
<td>
</td>
<td>No default</td>
</tr>
</table>
### File_WriteAt_Response {#File_WriteAt_Response data-text="File_WriteAt_Response"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=137)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="File_WriteAt_Response.actual_count">
<td><code>actual_count</code></td>
<td>
<code>uint64</code>
</td>
<td>
</td>
<td>No default</td>
</tr>
</table>
### File_Write_Response {#File_Write_Response data-text="File_Write_Response"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=87)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="File_Write_Response.actual_count">
<td><code>actual_count</code></td>
<td>
<code>uint64</code>
</td>
<td>
</td>
<td>No default</td>
</tr>
</table>
### IdleEvent {#IdleEvent data-text="IdleEvent"}
*Defined in [fuchsia.io2/directory-watcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory-watcher.fidl;l=66)*
&lt;EMPTY&gt;
### InotifyEvent {#InotifyEvent data-text="InotifyEvent"}
*Defined in [fuchsia.io2/inotify.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/inotify.fidl;l=50)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="InotifyEvent.watch_descriptor">
<td><code>watch_descriptor</code></td>
<td>
<code>uint32</code>
</td>
<td>
</td>
<td>No default</td>
</tr><tr id="InotifyEvent.mask">
<td><code>mask</code></td>
<td>
<code><a class='link' href='#InotifyWatchMask'>InotifyWatchMask</a></code>
</td>
<td>
</td>
<td>No default</td>
</tr><tr id="InotifyEvent.cookie">
<td><code>cookie</code></td>
<td>
<code>uint32</code>
</td>
<td>
</td>
<td>No default</td>
</tr><tr id="InotifyEvent.len">
<td><code>len</code></td>
<td>
<code>uint32</code>
</td>
<td>
</td>
<td>No default</td>
</tr><tr id="InotifyEvent.filename">
<td><code>filename</code></td>
<td>
<code><a class='link' href='#Path'>Path</a></code>
</td>
<td>
</td>
<td>No default</td>
</tr>
</table>
### Node_GetAttributes_Response {#Node_GetAttributes_Response data-text="Node_GetAttributes_Response"}
*Defined in [fuchsia.io2/node.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/node.fidl;l=93)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="Node_GetAttributes_Response.attributes">
<td><code>attributes</code></td>
<td>
<code><a class='link' href='#NodeAttributes'>NodeAttributes</a></code>
</td>
<td>
</td>
<td>No default</td>
</tr>
</table>
### Node_GetToken_Response [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Node_GetToken_Response data-text="Node_GetToken_Response"}
*Defined in [fuchsia.io2/node.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/node.fidl;l=77)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="Node_GetToken_Response.token">
<td><code>token</code></td>
<td>
<code><a class='link' href='#Token'>Token</a></code>
</td>
<td>
</td>
<td>No default</td>
</tr>
</table>
### Node_Sync_Response {#Node_Sync_Response data-text="Node_Sync_Response"}
*Defined in [fuchsia.io2/node.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/node.fidl;l=116)*
&lt;EMPTY&gt;
### Node_UpdateAttributes_Response {#Node_UpdateAttributes_Response data-text="Node_UpdateAttributes_Response"}
*Defined in [fuchsia.io2/node.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/node.fidl;l=105)*
&lt;EMPTY&gt;
### RightsRequest {#RightsRequest data-text="RightsRequest"}
*Defined in [fuchsia.io2/connection-options.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/connection-options.fidl;l=127)*
<p>Options for requesting rights on the new connection. Because opening a
new connection may involve multiple hops through directory proxies,
we require the client to set an upper bound and lower bound on the
rights request, and intermediate proxies to refine these bounds.</p>
<p>The rights manipulation should be implemented mechanically
without knowledge of any specific rights, and servers should propagate
unknown bits members, to gracefully handle future rights extensions.</p>
<h2>Implementation Notes</h2>
<p>It could be common for a client to request an exact set of rights.
We recommend client libraries to define a helper function like follows:</p>
<pre><code>fn Exact(exact_rights: Rights) -&gt; RightsRequest {
RightsRequest {
at_most: exact_rights,
at_least: exact_rights,
resolution: RightsResolution.MAXIMIZE,
}
}
</code></pre>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr><tr id="RightsRequest.at_most">
<td><code>at_most</code></td>
<td>
<code><a class='link' href='#Rights'>Rights</a></code>
</td>
<td><p>Sets an upper bound on the resulting rights. The exact rights will
depend on <code>resolution</code>.</p>
<h2>Implementation Notes</h2>
<p>When a directory proxy encounters this variant, it should compute the
intersection between this and the rights on the connection where it
received the request, to shrink the rights.</p>
<ul>
<li>If the intersection is empty, or not a superset of <code>at_least</code>,
the proxy should close <code>object_request</code> with the
<code>ZX_ERR_ACCESS_DENIED</code> epitaph.</li>
<li>Otherwise, the proxy should forward the <code>Open</code> call as usual,
but update <code>at_most</code> with the shrunk rights.</li>
</ul>
</td>
<td>No default</td>
</tr><tr id="RightsRequest.at_least">
<td><code>at_least</code></td>
<td>
<code><a class='link' href='#Rights'>Rights</a></code>
</td>
<td><p>Sets a lower bound on the resulting rights. The exact rights will
depend on <code>resolution</code>.</p>
<ul>
<li>During <a class='link' href='#Directory.Open'>Directory.Open</a>, you may only specify the same rights as
what the directory connection already has, or a subset of those.</li>
<li>During <a class='link' href='#Node.Reopen'>Node.Reopen</a>, similarly, you may only specify the same or
a subset of rights possessed by the original connection.</li>
<li>Exceeding those rights causes <code>object_request</code> to be closed with a
<code>ZX_ERR_ACCESS_DENIED</code> epitaph.</li>
</ul>
<p>Therefore there are these invariants which should be maintained:</p>
<pre><code>at_most ⊋ {}
at_most ⊃ at_least
rights_on_connection_where_open_is_received ⊋ {}
rights_on_connection_where_open_is_received ⊃ at_least
</code></pre>
<p>using the superset (<code>⊃</code>), proper superset (<code>⊋</code>),
and empty set (<code>{}</code>) notations.</p>
</td>
<td>No default</td>
</tr><tr id="RightsRequest.resolution">
<td><code>resolution</code></td>
<td>
<code><a class='link' href='#RightsResolution'>RightsResolution</a></code>
</td>
<td><p>Controls how the rights on the new connection are computed from
<code>at_most</code> and <code>at_least</code>. See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#RightsResolution'>RightsResolution</a>.</p>
</td>
<td>No default</td>
</tr>
</table>
## **ENUMS**
### AdvisoryLockType [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#AdvisoryLockType}
Type: <code>uint32</code>
*Defined in [fuchsia.io2/locking.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/locking.fidl;l=53)*
<p>A type of advisory lock.</p>
<p>Used with <a class='link' href='#AdvisoryLocking.AdvisoryLock'>AdvisoryLocking.AdvisoryLock</a>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="AdvisoryLockType.READ">
<td><code>READ</code></td>
<td><code>1</code></td>
<td><p>Zero or more connections can hold read locks on a file simultaneously.</p>
</td>
</tr><tr id="AdvisoryLockType.WRITE">
<td><code>WRITE</code></td>
<td><code>2</code></td>
<td><p>At most one connection can hold a write lock on a file simultaneously.
When a write lock is held on a file, no other types of locks can be held
on that file.</p>
</td>
</tr><tr id="AdvisoryLockType.UNLOCK">
<td><code>UNLOCK</code></td>
<td><code>3</code></td>
<td><p>The region specifies a region to be unlocked.</p>
</td>
</tr></table>
### OpenMode [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#OpenMode}
Type: <code>uint32</code>
*Defined in [fuchsia.io2/directory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory.fidl;l=175)*
<p>Options related to node creation during <a class='link' href='#Directory.Open'>Directory.Open</a>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="OpenMode.OPEN_EXISTING">
<td><code>OPEN_EXISTING</code></td>
<td><code>1</code></td>
<td><p>Only succeed if the object exists.</p>
</td>
</tr><tr id="OpenMode.MAYBE_CREATE">
<td><code>MAYBE_CREATE</code></td>
<td><code>2</code></td>
<td><p>Create the object if it does not exist, otherwise open existing.
The check and the creation are performed in one atomic step.</p>
</td>
</tr><tr id="OpenMode.ALWAYS_CREATE">
<td><code>ALWAYS_CREATE</code></td>
<td><code>3</code></td>
<td><p>Assert that the object does not exist, then create it.
The assertion and creation are performed in one atomic step.</p>
</td>
</tr><tr id="OpenMode.OPEN_MOUNT_POINT">
<td><code>OPEN_MOUNT_POINT</code></td>
<td><code>268435456</code></td>
<td><p>If the object is a mount point, open the local directory
instead of forwarding the request. The object must be a directory.</p>
<p>This option implies the behavior of <code>OPEN_EXISTING</code>.</p>
<p><b>DEPRECATED </b>- Mount points will be replaced by components.</p>
</td>
</tr></table>
### RightsResolution [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#RightsResolution}
Type: <code>uint32</code>
*Defined in [fuchsia.io2/connection-options.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/connection-options.fidl;l=174)*
<p>When an <code>Open</code>/<code>Reopen</code> request reaches its final remote server, it should
assign rights on the new connection based on one of these modes.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="RightsResolution.MAXIMIZE">
<td><code>MAXIMIZE</code></td>
<td><code>1</code></td>
<td><p>The rights will be the intersection between <a class='link' href='#RightsRequest.at_most'>RightsRequest.at_most</a>
and the connection where the <code>Open</code>/<code>Reopen</code> request was received,
closing <code>object_request</code> with <code>ZX_ERR_ACCESS_DENIED</code> if it is empty.</p>
</td>
</tr><tr id="RightsResolution.POSIX">
<td><code>POSIX</code></td>
<td><code>2</code></td>
<td><p>The rights will be determined by the following rules:</p>
<ul>
<li>If the negotiated protocol on the new connection is
<a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Directory'>Directory</a>, the rules from the <code>MAXIMIZE</code> case applies.</li>
<li>Otherwise, the rights will be <a class='link' href='#RightsRequest.at_least'>RightsRequest.at_least</a> if it
does not exceed rights on the current connection.</li>
<li>Otherwise, <code>object_request</code> should be closed with
<code>ZX_ERR_ACCESS_DENIED</code>.</li>
</ul>
<p>The motivation for this enum is to facilitate implementing POSIX
compatibility layers. The POSIX file permission model relies on ambient
authority: access control on files are resolved based on the <code>mode</code> of
the file, and the current user. There is no concept of hierarchical
permissions. Fuchsia, on the other hand, restricts rights on file
connections to never exceed that of its containing directory connection.</p>
</td>
</tr></table>
### SeekOrigin [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#SeekOrigin}
Type: <code>uint32</code>
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=175)*
<p>The reference point for updating the seek offset. See <a class='link' href='#File.Seek'>File.Seek</a>.</p>
<p>This enum matches the <code>zx_stream_seek_origin_t</code> enum.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="SeekOrigin.START">
<td><code>START</code></td>
<td><code>0</code></td>
<td><p>Seek from the start of the file.
The seek offset will be set to <code>offset</code> bytes.
The seek offset cannot be negative in this case.</p>
</td>
</tr><tr id="SeekOrigin.CURRENT">
<td><code>CURRENT</code></td>
<td><code>1</code></td>
<td><p>Seek from the current position in the file.
The seek offset will be the current seek offset plus <code>offset</code> bytes.</p>
</td>
</tr><tr id="SeekOrigin.END">
<td><code>END</code></td>
<td><code>2</code></td>
<td><p>Seek from the end of the file.
The seek offset will be the file size plus <code>offset</code> bytes.</p>
</td>
</tr></table>
## **TABLES**
### AdvisoryLockRequest {#AdvisoryLockRequest data-text="AdvisoryLockRequest"}
*Defined in [fuchsia.io2/locking.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/locking.fidl;l=89)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="AdvisoryLockRequest.type">
<td>1</td>
<td><code>type</code></td>
<td>
<code><a class='link' href='#AdvisoryLockType'>AdvisoryLockType</a></code>
</td>
<td><p>The type of lock to be acquired.</p>
<p>If this field is absent, the <a class='link' href='#AdvisoryLock'>AdvisoryLock</a> method will fail
with ZX_ERR_INVALID_ARGS.</p>
</td>
</tr><tr id="AdvisoryLockRequest.range">
<td>2</td>
<td><code>range</code></td>
<td>
<code><a class='link' href='#AdvisoryLockRange'>AdvisoryLockRange</a></code>
</td>
<td><p>The byte range within the file to be locked. See <a class='link' href='#AdvisoryLockRange'>AdvisoryLockRange</a>
for semantics.</p>
<p>If this field is absent, the range defaults to the entire file.</p>
</td>
</tr><tr id="AdvisoryLockRequest.wait">
<td>3</td>
<td><code>wait</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether the file should wait reply to the <a class='link' href='#AdvisoryLock'>AdvisoryLock</a>
method until the requested lock can be acquired.</p>
<p>If this field is absent, the file will not wait.</p>
</td>
</tr></table>
### ConnectionInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#ConnectionInfo data-text="ConnectionInfo"}
*Defined in [fuchsia.io2/connection-info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/connection-info.fidl;l=8)*
<p>Returns run-time information about a node that is specific to the
current connection.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ConnectionInfo.representation">
<td>1</td>
<td><code>representation</code></td>
<td>
<code><a class='link' href='#Representation'>Representation</a></code>
</td>
<td><p>The active variant corresponds to one of the supported protocols
of the node, and represents the result of the connection-time
negotiation. Provides auxiliary handles if applicable.</p>
</td>
</tr><tr id="ConnectionInfo.rights">
<td>2</td>
<td><code>rights</code></td>
<td>
<code><a class='link' href='#Rights'>Rights</a></code>
</td>
<td><p>Information about the rights possessed by the current connection.
Note: <code>rights</code> limits the set of operations allowed on the connection,
but does not guarantee their availability. For example, one may have
the <a class='link' href='#Rights.EXECUTE'>Rights.EXECUTE</a> right on a file connection, but the file itself
does not have the <code>EXECUTE</code> ability, and hence cannot be executed.
See <a class='link' href='#ConnectionOptions.rights'>ConnectionOptions.rights</a>.</p>
</td>
</tr><tr id="ConnectionInfo.available_operations">
<td>3</td>
<td><code>available_operations</code></td>
<td>
<code><a class='link' href='#Operations'>Operations</a></code>
</td>
<td><p>The set of available operations on this channel. It is always the
intersection between the rights possessed by this connection, and the
abilities of the node. The value may be zero in the case of an empty
intersection.
See <a class='link' href='#ConnectionOptions.rights'>ConnectionOptions.rights</a>.</p>
</td>
</tr></table>
### ConnectionOptions {#ConnectionOptions data-text="ConnectionOptions"}
*Defined in [fuchsia.io2/connection-options.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/connection-options.fidl;l=7)*
<p>Options for <a class='link' href='#Directory.Open'>Directory.Open</a> and <a class='link' href='#Node.Reopen'>Node.Reopen</a>.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ConnectionOptions.flags">
<td>1</td>
<td><code>flags</code></td>
<td>
<code><a class='link' href='#ConnectionFlags'>ConnectionFlags</a></code>
</td>
<td><p>Flags which can affect the behavior when opening and reopening.
If absent, assumes a default of zero.</p>
</td>
</tr><tr id="ConnectionOptions.protocols">
<td>2</td>
<td><code>protocols</code></td>
<td>
<code><a class='link' href='#NodeProtocols'>NodeProtocols</a></code>
</td>
<td><p>Specifies the set of representations accepted by the client, to support
a form of protocol negotiation on the node being opened.
Refer to the definition of <a class='link' href='#NodeProtocols'>NodeProtocols</a> for more details.
It cannot be zero.</p>
<p>In addition, clients may assert the type of the object by setting
the protocol corresponding to the expected type:</p>
<ul>
<li>If the caller expected a directory but the node cannot be accessed
as a directory, the error is <code>ZX_ERR_NOT_DIR</code>.</li>
<li>If the caller expected a file but the node cannot be accessed as a
file, the error is <code>ZX_ERR_NOT_FILE</code>.</li>
<li>In other mismatched cases, the error is <code>ZX_ERR_WRONG_TYPE</code>.</li>
</ul>
<p>During <a class='link' href='#Directory.Open'>Directory.Open</a>, if a new object is to be created, <code>protocols</code>
determines the type of object to create; it must be present.
If a valid object type cannot be unambiguously inferred e.g.
both <code>DIRECTORY</code> and <code>FILE</code> were set, the request must fail.</p>
<p>During <a class='link' href='#Node.Reopen'>Node.Reopen</a>, clients may specify a different but compatible
<code>protocols</code> to do a &quot;protocol upgrade&quot;.</p>
<p>If more than one protocol is present in <code>protocols</code>, the resultant
protocol may become any one of them. Clients should specify
<a class='link' href='#ConnectionFlags.GET_CONNECTION_INFO'>ConnectionFlags.GET_CONNECTION_INFO</a> to receive a
<a class='link' href='#Node.OnConnectionInfo'>Node.OnConnectionInfo</a> event, in order to ascertain the protocol.</p>
<p>If absent, indicates that the caller accepts any type of node, and
the resulting protocol is unspecified.</p>
</td>
</tr><tr id="ConnectionOptions.rights_request">
<td>3</td>
<td><code>rights_request</code></td>
<td>
<code><a class='link' href='#RightsRequest'>RightsRequest</a></code>
</td>
<td><p>Requests rights on the new connection according to the specified rules.
See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#RightsRequest'>RightsRequest</a>.</p>
<h2>Rights Hierarchy</h2>
<p>Respecting principles of least privileges, rights in general must meet
the following restrictions:</p>
<ul>
<li>A connection must have nonzero rights.</li>
<li>From the perspective of a client, rights must never increase in a
derived connection.</li>
<li>From the perspective of a directory proxy, it must ensure that
new connections opened through it cannot have more rights than
the connection where the proxy received the <code>Open</code>/<code>Reopen</code> call.</li>
</ul>
<p>The proper enforcement of the rights hierarchy is a powerful refinement
over the existing access control facilities offered by directory
sandboxing.</p>
<h2>Rights Inheritance</h2>
<p>If <code>rights_request</code> is absent, inherits at most the rights on the source
connection:</p>
<ul>
<li>During <a class='link' href='#Node.Reopen'>Node.Reopen</a>, the new connection would have the same rights
as the connection where the <code>Reopen</code> call is made.</li>
<li>During <a class='link' href='#Directory.Open'>Directory.Open</a>, the rights on the connection would inherit
from the connection where the <code>Open</code> call is made. If the path crosses
intermediate proxies, a proxy may strip elements from the resulting
rights if the intermediate connection does not have the corresponding
rights.</li>
</ul>
<h2>Rights vs Abilities</h2>
<p>The rights on a connection limits the set of operations allowed on that
connection, but does not guarantee their availability, because the
object may not support it. For convenience, clients may query the
<a class='link' href='#ConnectionInfo.available_operations'>ConnectionInfo.available_operations</a> field on a new connection,
which is the intersection of the rights and abilities and indicates the
guaranteed set of available operations.</p>
<p>See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Rights'>Rights</a> and <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Abilities'>Abilities</a>.</p>
<h2>Implementation Notes</h2>
<p>When a directory proxy encounters an absent <code>rights</code> field, let <code>r</code> be
the rights on the connection where it received this request, the proxy
should fill in this field with the following:</p>
<pre><code>RightsRequest {
at_most: r,
at_least: 0,
resolution: RightsResolution.MAXIMIZE,
}
</code></pre>
<p>before forwarding the request to the remote party.</p>
</td>
</tr></table>
### ConnectorInfo {#ConnectorInfo data-text="ConnectorInfo"}
*Defined in [fuchsia.io2/connector.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/connector.fidl;l=11)*
<p>Auxiliary data for the connector representation of a node, used for
protocol discovery and connection.</p>
<p>It supports connecting to arbitrary protocols exported by the filesystem
server at a path, including ones that do not compose <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Node'>Node</a>.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
</table>
### DebuglogInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#DebuglogInfo data-text="DebuglogInfo"}
*Defined in [fuchsia.io2/debuglog.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/debuglog.fidl;l=18)*
<p>The debuglog representation of a node.
The selection of this variant in <a class='link' href='#Representation'>Representation</a> implies that the
connection speaks the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Debuglog'>Debuglog</a> protocol.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="DebuglogInfo.debuglog">
<td>1</td>
<td><code>debuglog</code></td>
<td>
<code>handle&lt;debuglog&gt;</code>
</td>
<td><p>The backing debuglog kernel object.</p>
</td>
</tr></table>
### DeviceInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#DeviceInfo data-text="DeviceInfo"}
*Defined in [fuchsia.io2/deprecated.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/deprecated.fidl;l=24)*
<p>The object may be cast to the shared interface of devices.</p>
<p><b>DEPRECATED </b>- devices will be services in the future</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="DeviceInfo.unused">
<td>1</td>
<td><code>unused</code></td>
<td>
<code>handle&lt;eventpair&gt;</code>
</td>
<td><p>An optional event which transmits information about a device's state.</p>
<p>The <a class='link' href='#DeviceSignal'>DeviceSignal</a> values may be observed on this event.</p>
</td>
</tr></table>
### DirectoryEntry {#DirectoryEntry data-text="DirectoryEntry"}
*Defined in [fuchsia.io2/directory-entry.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory-entry.fidl;l=10)*
<p>Information about an immediate child node of a directory.</p>
<p>If a particular attribute is not applicable or not supported,
implementations should leave the corresponding field absent.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="DirectoryEntry.name">
<td>1</td>
<td><code>name</code></td>
<td>
<code><a class='link' href='#Name'>Name</a></code>
</td>
<td><p>Name of the node. This field must be present.</p>
</td>
</tr><tr id="DirectoryEntry.protocols">
<td>2</td>
<td><code>protocols</code></td>
<td>
<code><a class='link' href='#NodeProtocols'>NodeProtocols</a></code>
</td>
<td><p>Describes the kinds of representations supported by the node.</p>
</td>
</tr><tr id="DirectoryEntry.abilities">
<td>3</td>
<td><code>abilities</code></td>
<td>
<code><a class='link' href='#Abilities'>Abilities</a></code>
</td>
<td><p>Describes the kinds of operations supported by the node.</p>
</td>
</tr><tr id="DirectoryEntry.id">
<td>4</td>
<td><code>id</code></td>
<td>
<code><a class='link' href='#Id'>Id</a></code>
</td>
<td><p>An ID for the node. See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Id'>Id</a>.
This <code>id</code> should be unique among all entries of a directory.</p>
</td>
</tr></table>
### DirectoryEnumerateOptions {#DirectoryEnumerateOptions data-text="DirectoryEnumerateOptions"}
*Defined in [fuchsia.io2/directory-iterator.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory-iterator.fidl;l=32)*
<p>Options to pass to <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Directory.Enumerate'>Directory.Enumerate</a>.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
</table>
### DirectoryInfo {#DirectoryInfo data-text="DirectoryInfo"}
*Defined in [fuchsia.io2/directory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory.fidl;l=198)*
<p>Auxiliary data for the directory representation of a node.
The selection of this variant in <a class='link' href='#Representation'>Representation</a> implies that the
connection speaks the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Directory'>Directory</a> protocol.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
</table>
### DirectoryWatchOptions {#DirectoryWatchOptions data-text="DirectoryWatchOptions"}
*Defined in [fuchsia.io2/directory-watcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory-watcher.fidl;l=31)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
</table>
### FileInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#FileInfo data-text="FileInfo"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=215)*
<p>Auxiliary data for the file representation of a node.
The selection of this variant in <a class='link' href='#Representation'>Representation</a> implies that the
connection speaks the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#File'>File</a> protocol.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="FileInfo.observer">
<td>1</td>
<td><code>observer</code></td>
<td>
<code>handle&lt;event&gt;</code>
</td>
<td><p>An optional event which transmits information about an object's
readability or writability. This event relays information about the
underlying object, not the capability granted to client: this event
may be signalled &quot;readable&quot; on a connection that does not have
the capability to read.</p>
<p>This event will be present if the following conditions are met:</p>
<ul>
<li>The <code>available_operations</code> on the file connection is not empty.</li>
<li>The filesystem supports signalling readability/writability events.</li>
</ul>
<p>The <a class='link' href='#FileSignal'>FileSignal</a> values may be observed on this event.</p>
</td>
</tr><tr id="FileInfo.is_append">
<td>2</td>
<td><code>is_append</code></td>
<td>
<code>bool</code>
</td>
<td><p>Returns if the file is opened in append mode.
In append mode, the seek offset is moved to the end before every
write, the two steps performed in an atomic manner.</p>
</td>
</tr><tr id="FileInfo.stream">
<td>3</td>
<td><code>stream</code></td>
<td>
<code>handle&lt;stream&gt;</code>
</td>
<td><p>An optional stream object, which can be used to read to and write from
the file.</p>
<p>Reading and writing the file using the stream object can be up to 20x
faster than reading and writing the file using the Read and Write
operations in the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#File'>File</a> protocol.</p>
</td>
</tr></table>
### MemoryInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#MemoryInfo data-text="MemoryInfo"}
*Defined in [fuchsia.io2/memory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/memory.fidl;l=20)*
<p>Auxiliary data for the memory object representation of a node.
The node is a file which is represented as a VMO.
The selection of this variant in <a class='link' href='#Representation'>Representation</a> implies that the
connection speaks the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Memory'>Memory</a> protocol.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="MemoryInfo.buffer">
<td>1</td>
<td><code>buffer</code></td>
<td>
<code><a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Range'>Range</a></code>
</td>
<td><p>Although a VMO is returned as a part of this structure, that VMO may
back multiple files. To identify the logical portion of the VMO that
represents the single file, offset and size are also supplied.</p>
<p>If the range covers the entire VMO (i.e. the offset is zero and the
length matches the size of the VMO), then all clients must receive a
VMO with the same koid. This can be a duplicate of the same underlying
page-aligned VMO.</p>
<p>The rights on this VMO should correspond to the rights on the
node connection.</p>
</td>
</tr></table>
### NodeAttributes {#NodeAttributes data-text="NodeAttributes"}
*Defined in [fuchsia.io2/node-attributes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/node-attributes.fidl;l=14)*
<p>Objective information about a filesystem node.
See <a class='link' href='#Node.GetAttributes'>Node.GetAttributes</a> and <a class='link' href='#Node.UpdateAttributes'>Node.UpdateAttributes</a>.</p>
<p>The attributes of a node should be stable, independent of the
specific protocol used to access it.</p>
<p>If a particular attribute is not applicable or not supported,
filesystems should leave the corresponding field absent.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="NodeAttributes.protocols">
<td>1</td>
<td><code>protocols</code></td>
<td>
<code><a class='link' href='#NodeProtocols'>NodeProtocols</a></code>
</td>
<td><p>Describes the kinds of representations supported by the node.
Note: This is not the result of the connection-time negotiation,
which is conveyed via <code>representation</code>.</p>
<p>This attribute is read-only.</p>
</td>
</tr><tr id="NodeAttributes.abilities">
<td>2</td>
<td><code>abilities</code></td>
<td>
<code><a class='link' href='#Abilities'>Abilities</a></code>
</td>
<td><p>Describes the kinds of operations supported by the node.
Note: This is distinct from the rights used at connection time.</p>
<p>This attribute is read-only.</p>
</td>
</tr><tr id="NodeAttributes.content_size">
<td>3</td>
<td><code>content_size</code></td>
<td>
<code>uint64</code>
</td>
<td><p>Node size, in bytes.</p>
<p>This attribute is read-only.</p>
</td>
</tr><tr id="NodeAttributes.storage_size">
<td>4</td>
<td><code>storage_size</code></td>
<td>
<code>uint64</code>
</td>
<td><p>Space needed to store the node (possibly larger than size), in bytes.</p>
<p>This attribute is read-only.</p>
</td>
</tr><tr id="NodeAttributes.link_count">
<td>5</td>
<td><code>link_count</code></td>
<td>
<code>uint64</code>
</td>
<td><p>Number of hard links to the node. It must be at least one.</p>
<p>This attribute is read-only.</p>
</td>
</tr><tr id="NodeAttributes.creation_time">
<td>6</td>
<td><code>creation_time</code></td>
<td>
<code>uint64</code>
</td>
<td><p>Time of creation in nanoseconds since the Unix epoch, UTC.
It may be updated manually after creation.</p>
</td>
</tr><tr id="NodeAttributes.modification_time">
<td>7</td>
<td><code>modification_time</code></td>
<td>
<code>uint64</code>
</td>
<td><p>Time of last modification in nanoseconds since the Unix epoch, UTC.</p>
</td>
</tr><tr id="NodeAttributes.id">
<td>8</td>
<td><code>id</code></td>
<td>
<code><a class='link' href='#Id'>Id</a></code>
</td>
<td><p>An ID for the node. See <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Id'>Id</a>.
This <code>id</code> should be unique among all entries of a directory.</p>
<p>This attribute is read-only.</p>
</td>
</tr></table>
### PipeInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#PipeInfo data-text="PipeInfo"}
*Defined in [fuchsia.io2/pipe.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/pipe.fidl;l=21)*
<p>The pipe representation of a node.
A pipe is a data streaming interface, commonly used for standard in/out.
There is no universal requirement as to if it is uni- or bi-directional.
The selection of this variant in <a class='link' href='#Representation'>Representation</a> implies that the
connection speaks the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Pipe'>Pipe</a> protocol.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="PipeInfo.socket">
<td>1</td>
<td><code>socket</code></td>
<td>
<code>handle&lt;socket&gt;</code>
</td>
<td><p>The backing socket transport for the pipe.
The rights on this socket should correspond to the rights on the
node connection.</p>
</td>
</tr></table>
### PosixSocketInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#PosixSocketInfo data-text="PosixSocketInfo"}
*Defined in [fuchsia.io2/posix-socket.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/posix-socket.fidl;l=11)*
<p>Auxiliary data for the POSIX socket representation of a node.
The selection of this variant in <a class='link' href='#Representation'>Representation</a> implies that the
connection speaks the <a class='link' href='../fuchsia.posix.socket/'>fuchsia.posix.socket</a>/<a class='link' href='../fuchsia.posix.socket/#Control'>Control</a> protocol.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="PosixSocketInfo.socket">
<td>1</td>
<td><code>socket</code></td>
<td>
<code>handle&lt;socket&gt;</code>
</td>
<td><p>The backing transport for the socket.
The rights on this socket should correspond to the rights on the
node connection.</p>
</td>
</tr></table>
### TtyInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#TtyInfo data-text="TtyInfo"}
*Defined in [fuchsia.io2/deprecated.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/deprecated.fidl;l=33)*
<p>The object may be cast to a Tty interface.</p>
<p><b>DEPRECATED </b>- tty functionalities may be covered by a tty service</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="TtyInfo.event">
<td>1</td>
<td><code>event</code></td>
<td>
<code>handle&lt;eventpair&gt;</code>
</td>
<td><p>An optional event which transmits information about a device's state.</p>
<p>The <a class='link' href='#DeviceSignal'>DeviceSignal</a> values may be observed on this event.</p>
</td>
</tr></table>
### UnlinkOptions {#UnlinkOptions data-text="UnlinkOptions"}
*Defined in [fuchsia.io2/directory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory.fidl;l=201)*
<p>Options for <a class='link' href='#Directory.Unlink'>Directory.Unlink</a>.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="UnlinkOptions.flags">
<td>1</td>
<td><code>flags</code></td>
<td>
<code><a class='link' href='#UnlinkFlags'>UnlinkFlags</a></code>
</td>
<td>
</td>
</tr></table>
## **UNIONS**
### AdvisoryLocking_AdvisoryLock_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#AdvisoryLocking_AdvisoryLock_Result data-text="AdvisoryLocking_AdvisoryLock_Result"}
*Defined in [fuchsia.io2/locking.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/locking.fidl;l=47)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="AdvisoryLocking_AdvisoryLock_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#AdvisoryLocking_AdvisoryLock_Response'>AdvisoryLocking_AdvisoryLock_Response</a></code>
</td>
<td>
</td>
</tr><tr id="AdvisoryLocking_AdvisoryLock_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### DirectoryIterator_GetNext_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#DirectoryIterator_GetNext_Result data-text="DirectoryIterator_GetNext_Result"}
*Defined in [fuchsia.io2/directory-iterator.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory-iterator.fidl;l=22)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="DirectoryIterator_GetNext_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#DirectoryIterator_GetNext_Response'>DirectoryIterator_GetNext_Response</a></code>
</td>
<td>
</td>
</tr><tr id="DirectoryIterator_GetNext_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### DirectoryWatchedEvent [flexible](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#DirectoryWatchedEvent data-text="DirectoryWatchedEvent"}
*Defined in [fuchsia.io2/directory-watcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory-watcher.fidl;l=34)*
<p>Events returned from <a class='link' href='#DirectoryWatcher.GetNext'>DirectoryWatcher.GetNext</a>.</p>
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="DirectoryWatchedEvent.existing">
<td>1</td>
<td><code>existing</code></td>
<td>
<code><a class='link' href='#DirectoryEntry'>DirectoryEntry</a></code>
</td>
<td><p>Indicates a node already existed in the directory when watching started.</p>
</td>
</tr><tr id="DirectoryWatchedEvent.idle">
<td>2</td>
<td><code>idle</code></td>
<td>
<code><a class='link' href='#IdleEvent'>IdleEvent</a></code>
</td>
<td><p>Indicates that no more <code>existing</code> events will be sent.</p>
</td>
</tr><tr id="DirectoryWatchedEvent.added">
<td>3</td>
<td><code>added</code></td>
<td>
<code><a class='link' href='#DirectoryEntry'>DirectoryEntry</a></code>
</td>
<td><p>Indicates a node has been created (either new or moved) into a
directory.</p>
</td>
</tr><tr id="DirectoryWatchedEvent.removed">
<td>4</td>
<td><code>removed</code></td>
<td>
<code><a class='link' href='#Name'>Name</a></code>
</td>
<td><p>Indicates a node has been removed (either deleted or moved) from the
directory.</p>
</td>
</tr></table>
### Directory_Link_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#Directory_Link_Result data-text="Directory_Link_Result"}
*Defined in [fuchsia.io2/directory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory.fidl;l=158)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="Directory_Link_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Directory_Link_Response'>Directory_Link_Response</a></code>
</td>
<td>
</td>
</tr><tr id="Directory_Link_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### Directory_Rename_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#Directory_Rename_Result data-text="Directory_Rename_Result"}
*Defined in [fuchsia.io2/directory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory.fidl;l=136)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="Directory_Rename_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Directory_Rename_Response'>Directory_Rename_Response</a></code>
</td>
<td>
</td>
</tr><tr id="Directory_Rename_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### Directory_Unlink_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#Directory_Unlink_Result data-text="Directory_Unlink_Result"}
*Defined in [fuchsia.io2/directory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory.fidl;l=107)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="Directory_Unlink_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Directory_Unlink_Response'>Directory_Unlink_Response</a></code>
</td>
<td>
</td>
</tr><tr id="Directory_Unlink_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### File_GetMemRange_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#File_GetMemRange_Result data-text="File_GetMemRange_Result"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=167)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="File_GetMemRange_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#File_GetMemRange_Response'>File_GetMemRange_Response</a></code>
</td>
<td>
</td>
</tr><tr id="File_GetMemRange_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### File_ReadAt_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#File_ReadAt_Result data-text="File_ReadAt_Result"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=111)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="File_ReadAt_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#File_ReadAt_Response'>File_ReadAt_Response</a></code>
</td>
<td>
</td>
</tr><tr id="File_ReadAt_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### File_Read_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#File_Read_Result data-text="File_Read_Result"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=60)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="File_Read_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#File_Read_Response'>File_Read_Response</a></code>
</td>
<td>
</td>
</tr><tr id="File_Read_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### File_Resize_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#File_Resize_Result data-text="File_Resize_Result"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=151)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="File_Resize_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#File_Resize_Response'>File_Resize_Response</a></code>
</td>
<td>
</td>
</tr><tr id="File_Resize_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### File_Seek_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#File_Seek_Result data-text="File_Seek_Result"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=36)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="File_Seek_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#File_Seek_Response'>File_Seek_Response</a></code>
</td>
<td>
</td>
</tr><tr id="File_Seek_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### File_WriteAt_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#File_WriteAt_Result data-text="File_WriteAt_Result"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=137)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="File_WriteAt_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#File_WriteAt_Response'>File_WriteAt_Response</a></code>
</td>
<td>
</td>
</tr><tr id="File_WriteAt_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### File_Write_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#File_Write_Result data-text="File_Write_Result"}
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=87)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="File_Write_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#File_Write_Response'>File_Write_Response</a></code>
</td>
<td>
</td>
</tr><tr id="File_Write_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### Node_GetAttributes_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#Node_GetAttributes_Result data-text="Node_GetAttributes_Result"}
*Defined in [fuchsia.io2/node.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/node.fidl;l=93)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="Node_GetAttributes_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Node_GetAttributes_Response'>Node_GetAttributes_Response</a></code>
</td>
<td>
</td>
</tr><tr id="Node_GetAttributes_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### Node_GetToken_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Node_GetToken_Result data-text="Node_GetToken_Result"}
*Defined in [fuchsia.io2/node.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/node.fidl;l=77)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="Node_GetToken_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Node_GetToken_Response'>Node_GetToken_Response</a></code>
</td>
<td>
</td>
</tr><tr id="Node_GetToken_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### Node_Sync_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#Node_Sync_Result data-text="Node_Sync_Result"}
*Defined in [fuchsia.io2/node.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/node.fidl;l=116)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="Node_Sync_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Node_Sync_Response'>Node_Sync_Response</a></code>
</td>
<td>
</td>
</tr><tr id="Node_Sync_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### Node_UpdateAttributes_Result [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#Node_UpdateAttributes_Result data-text="Node_UpdateAttributes_Result"}
*Defined in [fuchsia.io2/node.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/node.fidl;l=105)*
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="Node_UpdateAttributes_Result.response">
<td>1</td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Node_UpdateAttributes_Response'>Node_UpdateAttributes_Response</a></code>
</td>
<td>
</td>
</tr><tr id="Node_UpdateAttributes_Result.err">
<td>2</td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td>
</td>
</tr></table>
### Representation [flexible](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Representation data-text="Representation"}
*Defined in [fuchsia.io2/connection-info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/connection-info.fidl;l=56)*
<p>Describes how the connection should be handled, and provides auxiliary
handles and information for the connection where applicable.
Refer to <a class='link' href='#Node.Describe'>Node.Describe</a> and <a class='link' href='#Node.OnConnectionInfo'>Node.OnConnectionInfo</a>.</p>
<p>If handles are returned which offer alternative ways of access to the node,
the rights on the handles should correspond to the rights on the connection.</p>
<p>If the client specified more than one protocol in <code>protocols</code> during
<a class='link' href='#Directory.Open'>Directory.Open</a> or <a class='link' href='#Node.Reopen'>Node.Reopen</a>, the <a class='link' href='#Representation'>Representation</a> xunion carries
additionally the result of the connection-time negotiation via its tag.</p>
<p>The elements have one-to-one correspondence with the members of
<a class='link' href='#NodeProtocols'>NodeProtocols</a>.</p>
<table>
<tr><th>Ordinal</th><tr><th>Variant</th><th>Type</th><th>Description</th></tr><tr id="Representation.connector">
<td>1</td>
<td><code>connector</code></td>
<td>
<code><a class='link' href='#ConnectorInfo'>ConnectorInfo</a></code>
</td>
<td><p>See <a class='link' href='#NodeProtocols.CONNECTOR'>NodeProtocols.CONNECTOR</a>.</p>
</td>
</tr><tr id="Representation.directory">
<td>2</td>
<td><code>directory</code></td>
<td>
<code><a class='link' href='#DirectoryInfo'>DirectoryInfo</a></code>
</td>
<td><p>See <a class='link' href='#NodeProtocols.DIRECTORY'>NodeProtocols.DIRECTORY</a>.</p>
</td>
</tr><tr id="Representation.file">
<td>3</td>
<td><code>file</code></td>
<td>
<code><a class='link' href='#FileInfo'>FileInfo</a></code>
</td>
<td><p>See <a class='link' href='#NodeProtocols.FILE'>NodeProtocols.FILE</a>.</p>
</td>
</tr><tr id="Representation.memory">
<td>4</td>
<td><code>memory</code></td>
<td>
<code><a class='link' href='#MemoryInfo'>MemoryInfo</a></code>
</td>
<td><p>See <a class='link' href='#NodeProtocols.MEMORY'>NodeProtocols.MEMORY</a>.</p>
</td>
</tr><tr id="Representation.posix_socket">
<td>5</td>
<td><code>posix_socket</code></td>
<td>
<code><a class='link' href='#PosixSocketInfo'>PosixSocketInfo</a></code>
</td>
<td><p>See <a class='link' href='#NodeProtocols.POSIX_SOCKET'>NodeProtocols.POSIX_SOCKET</a>.</p>
</td>
</tr><tr id="Representation.pipe">
<td>6</td>
<td><code>pipe</code></td>
<td>
<code><a class='link' href='#PipeInfo'>PipeInfo</a></code>
</td>
<td><p>See <a class='link' href='#NodeProtocols.PIPE'>NodeProtocols.PIPE</a>.</p>
</td>
</tr><tr id="Representation.debuglog">
<td>7</td>
<td><code>debuglog</code></td>
<td>
<code><a class='link' href='#DebuglogInfo'>DebuglogInfo</a></code>
</td>
<td><p>See <a class='link' href='#NodeProtocols.DEBUGLOG'>NodeProtocols.DEBUGLOG</a>.</p>
</td>
</tr><tr id="Representation.device">
<td>8</td>
<td><code>device</code></td>
<td>
<code><a class='link' href='#DeviceInfo'>DeviceInfo</a></code>
</td>
<td><p><b>DEPRECATED </b>- devices will be services in the future</p>
</td>
</tr><tr id="Representation.tty">
<td>9</td>
<td><code>tty</code></td>
<td>
<code><a class='link' href='#TtyInfo'>TtyInfo</a></code>
</td>
<td><p><b>DEPRECATED </b>- tty may not be useful</p>
</td>
</tr></table>
## **BITS**
### ConnectionFlags [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#ConnectionFlags}
Type: <code>uint64</code>
*Defined in [fuchsia.io2/connection-options.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/connection-options.fidl;l=199)*
<p>Flags applicable to both <a class='link' href='#Directory.Open'>Directory.Open</a> and <a class='link' href='#Node.Reopen'>Node.Reopen</a>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="ConnectionFlags.GET_CONNECTION_INFO">
<td>GET_CONNECTION_INFO</td>
<td>1</td>
<td><p>Requests that an <a class='link' href='#Node.OnConnectionInfo'>Node.OnConnectionInfo</a> event be sent as the first
message on the protocol request. Requests all fields in the
<a class='link' href='#ConnectionInfo'>ConnectionInfo</a> table. Doing so is more efficient than calling
<a class='link' href='#Node.Describe'>Node.Describe</a> later on the connection.</p>
</td>
</tr><tr id="ConnectionFlags.CONNECT">
<td>CONNECT</td>
<td>2</td>
<td><p>Connects to the exposed protocol if the node is a Connector.
It is an error to use this flag with other types of nodes.</p>
<p>If both <code>GET_CONNECTION_INFO</code> and <code>CONNECT</code> are specified, the channel
will receive exactly one <a class='link' href='#Node.OnConnectionInfo'>Node.OnConnectionInfo</a> event, after which
the protocol switches from <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Node'>Node</a> to the intended protocol.
Message sent by the client prior to receiving <a class='link' href='#Node.OnConnectionInfo'>Node.OnConnectionInfo</a>
are queued and processed after the protocol switch.</p>
<p><code>CONNECT</code> cannot be supplied together with <code>APPEND</code>.
<code>CONNECT</code> cannot be supplied together with <code>TRUNCATE</code>.</p>
<p>Requires the <a class='link' href='#Rights.CONNECT'>Rights.CONNECT</a> right on the connection.</p>
</td>
</tr><tr id="ConnectionFlags.APPEND">
<td>APPEND</td>
<td>4</td>
<td><p>Opens the node in append mode, i.e. the connection should seek to the
end of the node before every write.</p>
<p>If the node does not support appending, it should result in a
<code>ZX_ERR_NOT_SUPPORTED</code> epitaph.
Currently, only <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#NodeProtocols.FILE'>NodeProtocols.FILE</a> connections
may be configured for appending.</p>
</td>
</tr><tr id="ConnectionFlags.TRUNCATE">
<td>TRUNCATE</td>
<td>8</td>
<td><p>Truncates the object before usage, by setting its length to 0.
Requires the <a class='link' href='#Rights.WRITE_BYTES'>Rights.WRITE_BYTES</a> right on the connection.</p>
<p>If the node does not support truncating, it should result in a
<code>ZX_ERR_NOT_SUPPORTED</code> epitaph.</p>
</td>
</tr></table>
### ConnectionInfoQuery [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#ConnectionInfoQuery}
Type: <code>uint64</code>
*Defined in [fuchsia.io2/connection-info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/connection-info.fidl;l=32)*
<p>Set the relevant bit to one to fetch the corresponding field
during <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Node.Describe'>Node.Describe</a>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="ConnectionInfoQuery.REPRESENTATION">
<td>REPRESENTATION</td>
<td>1</td>
<td><p>Requests <a class='link' href='#ConnectionInfo.representation'>ConnectionInfo.representation</a>.</p>
</td>
</tr><tr id="ConnectionInfoQuery.RIGHTS">
<td>RIGHTS</td>
<td>2</td>
<td><p>Requests <a class='link' href='#ConnectionInfo.rights'>ConnectionInfo.rights</a>.</p>
</td>
</tr><tr id="ConnectionInfoQuery.AVAILABLE_OPERATIONS">
<td>AVAILABLE_OPERATIONS</td>
<td>4</td>
<td><p>Requests <a class='link' href='#ConnectionInfo.available_operations'>ConnectionInfo.available_operations</a>.</p>
</td>
</tr></table>
### DeviceSignal [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#DeviceSignal}
Type: <code>uint32</code>
*Defined in [fuchsia.io2/deprecated.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/deprecated.fidl;l=9)*
<p><b>DEPRECATED </b>- devices will be services in the future</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="DeviceSignal.READABLE">
<td>READABLE</td>
<td>16777216</td>
<td><p>Indicates the device is ready for reading.</p>
</td>
</tr><tr id="DeviceSignal.WRITABLE">
<td>WRITABLE</td>
<td>33554432</td>
<td><p>Indicates the device is ready for writing.</p>
</td>
</tr><tr id="DeviceSignal.ERROR">
<td>ERROR</td>
<td>67108864</td>
<td><p>Indicates the device has encountered an error state.</p>
</td>
</tr><tr id="DeviceSignal.HANGUP">
<td>HANGUP</td>
<td>134217728</td>
<td><p>Indicates the device has hung up on the current connection.</p>
</td>
</tr><tr id="DeviceSignal.OOB">
<td>OOB</td>
<td>268435456</td>
<td><p>Indicates an out-of-band state transition has occurred.</p>
</td>
</tr></table>
### DirectoryWatchMask [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#DirectoryWatchMask}
Type: <code>uint64</code>
*Defined in [fuchsia.io2/directory-watcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory-watcher.fidl;l=52)*
<p>Used by <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Directory.Watch'>Directory.Watch</a> to indicate the types of events
interested by a watcher.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="DirectoryWatchMask.EXISTING">
<td>EXISTING</td>
<td>1</td>
<td><p>Requests transmission of <code>existing</code> events.</p>
</td>
</tr><tr id="DirectoryWatchMask.IDLE">
<td>IDLE</td>
<td>2</td>
<td><p>Requests transmission of <code>idle</code> events.</p>
</td>
</tr><tr id="DirectoryWatchMask.ADDED">
<td>ADDED</td>
<td>4</td>
<td><p>Requests transmission of <code>added</code> events.</p>
</td>
</tr><tr id="DirectoryWatchMask.REMOVED">
<td>REMOVED</td>
<td>8</td>
<td><p>Requests transmission of <code>removed</code> events.</p>
</td>
</tr></table>
### FileSignal [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#FileSignal}
Type: <code>uint32</code>
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=244)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="FileSignal.READABLE">
<td>READABLE</td>
<td>16777216</td>
<td><p>Indicates the file is ready for reading.</p>
</td>
</tr><tr id="FileSignal.WRITABLE">
<td>WRITABLE</td>
<td>33554432</td>
<td><p>Indicates the file is ready for writing.</p>
</td>
</tr></table>
### InotifyWatchMask [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#InotifyWatchMask}
Type: <code>uint32</code>
*Defined in [fuchsia.io2/inotify.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/inotify.fidl;l=17)*
<p>Used by InotifyAddWatch to indicate the server the events to be watched on.
Also used by <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Node.Inotify'>Node.Inotify</a> to indicate the types of events
that occured on server side, to be notified to clients. See InotifyEvent.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="InotifyWatchMask.ACCESS">
<td>ACCESS</td>
<td>1</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.MODIFY">
<td>MODIFY</td>
<td>2</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.ATTRIB">
<td>ATTRIB</td>
<td>4</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.CLOSE_WRITE">
<td>CLOSE_WRITE</td>
<td>8</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.CLOSE_NOWRITE">
<td>CLOSE_NOWRITE</td>
<td>16</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.OPEN">
<td>OPEN</td>
<td>32</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.MOVED_FROM">
<td>MOVED_FROM</td>
<td>64</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.MOVED_TO">
<td>MOVED_TO</td>
<td>128</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.CREATE">
<td>CREATE</td>
<td>256</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.DELETE">
<td>DELETE</td>
<td>512</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.DELETE_SELF">
<td>DELETE_SELF</td>
<td>1024</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.MOVE_SELF">
<td>MOVE_SELF</td>
<td>2048</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.UNMOUNT">
<td>UNMOUNT</td>
<td>8192</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.Q_OVERFLOW">
<td>Q_OVERFLOW</td>
<td>16384</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.IGNORED">
<td>IGNORED</td>
<td>32768</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.ONLYDIR">
<td>ONLYDIR</td>
<td>16777216</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.DONT_FOLLOW">
<td>DONT_FOLLOW</td>
<td>33554432</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.EXCL_UNLINK">
<td>EXCL_UNLINK</td>
<td>67108864</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.MASK_CREATE">
<td>MASK_CREATE</td>
<td>268435456</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.MASK_ADD">
<td>MASK_ADD</td>
<td>536870912</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.ISDIRECTORY">
<td>ISDIRECTORY</td>
<td>1073741824</td>
<td>
</td>
</tr><tr id="InotifyWatchMask.ONESHOT">
<td>ONESHOT</td>
<td>2147483648</td>
<td>
</td>
</tr></table>
### NodeAttributesQuery [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#NodeAttributesQuery}
Type: <code>uint64</code>
*Defined in [fuchsia.io2/node-attributes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/node-attributes.fidl;l=60)*
<p>When calling <a class='link' href='#Node.GetAttributes'>Node.GetAttributes</a>, set the corresponding bit to one
to query that particular attribute.
The elements here correspond one-to-one with <a class='link' href='#NodeAttributes'>NodeAttributes</a>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="NodeAttributesQuery.PROTOCOLS">
<td>PROTOCOLS</td>
<td>1</td>
<td><p>Requests <a class='link' href='#NodeAttributes.protocols'>NodeAttributes.protocols</a>.</p>
</td>
</tr><tr id="NodeAttributesQuery.ABILITIES">
<td>ABILITIES</td>
<td>2</td>
<td><p>Requests <a class='link' href='#NodeAttributes.abilities'>NodeAttributes.abilities</a>.</p>
</td>
</tr><tr id="NodeAttributesQuery.CONTENT_SIZE">
<td>CONTENT_SIZE</td>
<td>4</td>
<td><p>Requests <a class='link' href='#NodeAttributes.content_size'>NodeAttributes.content_size</a>.</p>
</td>
</tr><tr id="NodeAttributesQuery.STORAGE_SIZE">
<td>STORAGE_SIZE</td>
<td>8</td>
<td><p>Requests <a class='link' href='#NodeAttributes.storage_size'>NodeAttributes.storage_size</a>.</p>
</td>
</tr><tr id="NodeAttributesQuery.LINK_COUNT">
<td>LINK_COUNT</td>
<td>16</td>
<td><p>Requests <a class='link' href='#NodeAttributes.link_count'>NodeAttributes.link_count</a>.</p>
</td>
</tr><tr id="NodeAttributesQuery.CREATION_TIME">
<td>CREATION_TIME</td>
<td>32</td>
<td><p>Requests <a class='link' href='#NodeAttributes.creation_time'>NodeAttributes.creation_time</a>.</p>
</td>
</tr><tr id="NodeAttributesQuery.MODIFICATION_TIME">
<td>MODIFICATION_TIME</td>
<td>64</td>
<td><p>Requests <a class='link' href='#NodeAttributes.modification_time'>NodeAttributes.modification_time</a>.</p>
</td>
</tr><tr id="NodeAttributesQuery.ID">
<td>ID</td>
<td>128</td>
<td><p>Requests <a class='link' href='#NodeAttributes.id'>NodeAttributes.id</a>.</p>
</td>
</tr></table>
### NodeProtocols [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#NodeProtocols}
Type: <code>uint64</code>
*Defined in [fuchsia.io2/connection-info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/connection-info.fidl;l=101)*
<p>A node may have multiple supported representations when opening, even though
it may have a fixed underlying identity.</p>
<p>Today, a file is accessed via the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#File'>File</a> protocol, and sends a
<a class='link' href='#Representation.FileInfo'>Representation.FileInfo</a> when opened with <code>GET_CONNECTION_INFO</code>. However,
in the future we might introduce a more sophisticated <code>FileV2</code> protocol, or
a more efficient <code>SuperFastFile</code> backed by a specialized kernel object.
New clients can request the more advanced representations by specifying
the corresponding bits in <a class='link' href='#NodeProtocols'>NodeProtocols</a>, whereas existing clients
would continue to talk to the node via the old representation.</p>
<p><a class='link' href='#NodeProtocols'>NodeProtocols</a> enables forward-compatibility through a form of protocol
negotiation.</p>
<p>The elements have one-to-one correspondence with the members of
<a class='link' href='#Representation'>Representation</a>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="NodeProtocols.CONNECTOR">
<td>CONNECTOR</td>
<td>1</td>
<td><p>The connector representation of a node.
The connection will speak either <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Node'>Node</a>, or some custom
protocol, depending on the flags used during opening and reopening.</p>
</td>
</tr><tr id="NodeProtocols.DIRECTORY">
<td>DIRECTORY</td>
<td>2</td>
<td><p>The directory representation of a node.
The connection will speak the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Directory'>Directory</a> protocol.</p>
</td>
</tr><tr id="NodeProtocols.FILE">
<td>FILE</td>
<td>4</td>
<td><p>The file representation of a node.
The connection will speak the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#File'>File</a> protocol.</p>
</td>
</tr><tr id="NodeProtocols.MEMORY">
<td>MEMORY</td>
<td>8</td>
<td><p>The memory representation of a node. A memory object is a file whose
contents are explicitly backed by some VMO.
The connection will speak the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Memory'>Memory</a> protocol, and
<a class='link' href='#Representation'>Representation</a> would contain a <a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Range'>Range</a> object
representing the contents of the file.</p>
</td>
</tr><tr id="NodeProtocols.POSIX_SOCKET">
<td>POSIX_SOCKET</td>
<td>16</td>
<td><p>The POSIX socket representation of a node.
The connection will speak the <a class='link' href='../fuchsia.posix.socket/'>fuchsia.posix.socket</a>/<a class='link' href='../fuchsia.posix.socket/#Control'>Control</a> protocol.</p>
</td>
</tr><tr id="NodeProtocols.PIPE">
<td>PIPE</td>
<td>32</td>
<td><p>The pipe representation of a node.
The connection will speak the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Pipe'>Pipe</a> protocol.</p>
</td>
</tr><tr id="NodeProtocols.DEBUGLOG">
<td>DEBUGLOG</td>
<td>64</td>
<td><p>The debuglog representation of a node.
The connection will speak the <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Debuglog'>Debuglog</a> protocol.</p>
</td>
</tr><tr id="NodeProtocols.DEVICE">
<td>DEVICE</td>
<td>268435456</td>
<td><p><b>DEPRECATED </b>- devices will be services in the future</p>
</td>
</tr><tr id="NodeProtocols.TTY">
<td>TTY</td>
<td>536870912</td>
<td><p><b>DEPRECATED </b>- tty functionalities may be covered by a tty service</p>
</td>
</tr></table>
### Operations [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#Operations}
Type: <code>uint64</code>
*Defined in [fuchsia.io2/rights-abilities.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/rights-abilities.fidl;l=10)*
<p>The common members definition behind <a class='link' href='#Rights'>Rights</a> and <a class='link' href='#Abilities'>Abilities</a>.
Note that Directory operations are distinct from File operations, with the
exception of some common operations (e.g. <code>GET_ATTRIBUTES</code>) defined on the
underlying <a class='link' href='../fuchsia.io2/'>fuchsia.io2</a>/<a class='link' href='../fuchsia.io2/#Node'>Node</a>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="Operations.CONNECT">
<td>CONNECT</td>
<td>1</td>
<td><p>Connecting to a service.</p>
</td>
</tr><tr id="Operations.READ_BYTES">
<td>READ_BYTES</td>
<td>2</td>
<td><p>Reading from the byte contents of a node.</p>
</td>
</tr><tr id="Operations.WRITE_BYTES">
<td>WRITE_BYTES</td>
<td>4</td>
<td><p>Writing to the byte contents of a node.</p>
</td>
</tr><tr id="Operations.EXECUTE">
<td>EXECUTE</td>
<td>8</td>
<td><p>Execute the byte contents of a node.</p>
</td>
</tr><tr id="Operations.GET_ATTRIBUTES">
<td>GET_ATTRIBUTES</td>
<td>16</td>
<td><p>Reading the attributes of a node.</p>
</td>
</tr><tr id="Operations.UPDATE_ATTRIBUTES">
<td>UPDATE_ATTRIBUTES</td>
<td>32</td>
<td><p>Updating the attributes of a node.</p>
</td>
</tr><tr id="Operations.ENUMERATE">
<td>ENUMERATE</td>
<td>64</td>
<td><p>Reading the list of entries in a directory.</p>
</td>
</tr><tr id="Operations.TRAVERSE">
<td>TRAVERSE</td>
<td>128</td>
<td><p>Opening a node from a directory.</p>
<p>When used in <code>ConnectionOptions.rights</code>, it must be specified together
with <a class='link' href='#Rights.ENUMERATE'>Rights.ENUMERATE</a>, since one can always probe the directory
contents by opening children.</p>
</td>
</tr><tr id="Operations.MODIFY_DIRECTORY">
<td>MODIFY_DIRECTORY</td>
<td>256</td>
<td><p>Modifying the list of entries in a directory.
For example: node creation, renaming, linking, unlinking, etc.</p>
<p>When used in <code>ConnectionOptions.rights</code>, it must be specified together
with <a class='link' href='#Rights.ENUMERATE'>Rights.ENUMERATE</a>, since one can always probe the directory
contents by triggering name conflicts during node creation.</p>
</td>
</tr><tr id="Operations.ADMIN">
<td>ADMIN</td>
<td>72057594037927936</td>
<td>
</td>
</tr></table>
### UnlinkFlags [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#UnlinkFlags}
Type: <code>uint64</code>
*Defined in [fuchsia.io2/directory.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory.fidl;l=206)*
<p>Flags for <a class='link' href='#Directory.Unlink'>Directory.Unlink</a>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="UnlinkFlags.MUST_BE_DIRECTORY">
<td>MUST_BE_DIRECTORY</td>
<td>1</td>
<td><p>If set, the unlink will fail (with ZX_ERR_NOT_DIR) if the object is not a directory.</p>
</td>
</tr></table>
### VmoFlags [strict](/fuchsia-src/reference/fidl/language/language#strict-vs-flexible){:.fidl-attribute} {#VmoFlags}
Type: <code>uint64</code>
*Defined in [fuchsia.io2/file.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=190)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="VmoFlags.READ">
<td>READ</td>
<td>1</td>
<td><p>Requests that the VMO be readable.</p>
</td>
</tr><tr id="VmoFlags.WRITE">
<td>WRITE</td>
<td>2</td>
<td><p>Requests that the VMO be writable.</p>
</td>
</tr><tr id="VmoFlags.EXECUTE">
<td>EXECUTE</td>
<td>4</td>
<td><p>Request that the VMO be executable.</p>
</td>
</tr><tr id="VmoFlags.PRIVATE_CLONE">
<td>PRIVATE_CLONE</td>
<td>65536</td>
<td><p>Require a copy-on-write clone of the underlying VMO.
The request should fail if the VMO cannot be cloned.
May not be supplied with <code>SHARED_BUFFER</code>.</p>
</td>
</tr><tr id="VmoFlags.SHARED_BUFFER">
<td>SHARED_BUFFER</td>
<td>131072</td>
<td><p>Require an exact (non-cloned) handle to the underlying VMO.
All clients using this flag would get a VMO with the same koid.
The request should fail if a handle to the exact VMO cannot be returned.
May not be supplied with <code>PRIVATE_CLONE</code>.</p>
</td>
</tr></table>
## **CONSTANTS**
<table>
<tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr><tr id="CLOSE_ALL">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/inotify.fidl;l=46">CLOSE_ALL</a></td>
<td>
</td>
</tr>
<tr id="MAX_DIRECTORY_BATCH_SIZE">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/directory-iterator.fidl;l=29">MAX_DIRECTORY_BATCH_SIZE</a></td>
<td>
<code>8192</code>
</td>
<td><code>uint64</code></td>
<td><p>The maximum number of directory entires or watcher events returned
in a batch by a hanging-get pattern.</p>
</td>
</tr>
<tr id="MAX_NAME_LENGTH">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/io2.fidl;l=26">MAX_NAME_LENGTH</a></td>
<td>
<code>255</code>
</td>
<td><code>uint64</code></td>
<td><p>The maximum length, in bytes, of a single filesystem component.</p>
</td>
</tr>
<tr id="MAX_PATH_LENGTH">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/io2.fidl;l=47">MAX_PATH_LENGTH</a></td>
<td>
<code>4095</code>
</td>
<td><code>uint64</code></td>
<td><p>The maximum length, in bytes, of a filesystem path.</p>
</td>
</tr>
<tr id="MAX_TRANSFER_SIZE">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=13">MAX_TRANSFER_SIZE</a></td>
<td>
<code>8192</code>
</td>
<td><code>uint64</code></td>
<td><p>The maximum I/O size that is allowed for read/write operations using
byte vectors.</p>
</td>
</tr>
<tr id="MOVE">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/inotify.fidl;l=47">MOVE</a></td>
<td>
</td>
</tr>
<tr id="RW_STAR_DIR">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/rights-abilities.fidl;l=57">RW_STAR_DIR</a></td>
<td><p>Alias for directory permission alias rw*</p>
</td>
</tr>
<tr id="RX_STAR_DIR">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/rights-abilities.fidl;l=61">RX_STAR_DIR</a></td>
<td><p>Alias for directory permission alias rx*</p>
</td>
</tr>
<tr id="R_STAR_DIR">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/rights-abilities.fidl;l=53">R_STAR_DIR</a></td>
<td><p>Alias for directory permission alias r*</p>
</td>
</tr>
<tr id="W_STAR_DIR">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/rights-abilities.fidl;l=65">W_STAR_DIR</a></td>
<td><p>Alias for directory permission alias w*</p>
</td>
</tr>
<tr id="X_STAR_DIR">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/rights-abilities.fidl;l=69">X_STAR_DIR</a></td>
<td><p>Alias for directory permission alias x*</p>
</td>
</tr>
</table>
## **TYPE ALIASES**
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr><tr id="Abilities">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/rights-abilities.fidl;l=86">Abilities</a></td>
<td>
<code>fuchsia.io2/Operations</code></td>
<td><p>Abilities are properties intrinsic to a node. They specify which operations
are supported by it.</p>
<p>Invoking an operation without corresponding support in the node results in a
<code>ZX_ERR_NOT_SUPPORTED</code> error.
Note that if both the access denied and the not supported error conditions
apply, the access denied case takes precedence.</p>
</td>
</tr><tr id="Id">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/io2.fidl;l=70">Id</a></td>
<td>
<code>uint64</code></td>
<td><p>The type to identify a node, if the implementation supports some notion of
unique node ID.</p>
<h2>Uniqueness Guarantees</h2>
<p>A client is usually presented with a directory tree that is the result
of composing together multiple backing implementation instances. An ID
would be unique within the corresponding instance only.
Their boundaries are rather implicit on Fuchsia, as a result of
transparently-forwarding directory proxies. It could be common for a client
to observe identical <code>Id</code>s when traversing a directory tree, when it
encounters nodes from different backing instances. Therefore, the ID is best
used for debugging and informational purposes.</p>
<p>If the implementation also supports <a class='link' href='../fuchsia.fs/'>fuchsia.fs</a>/<a class='link' href='../fuchsia.fs/#Query'>Query</a>, the
<a class='link' href='../fuchsia.fs/'>fuchsia.fs</a>/<a class='link' href='../fuchsia.fs/#FilesystemInfo.fs_id'>FilesystemInfo.fs_id</a> field may be used to disambiguate IDs
from different backing instances.</p>
</td>
</tr><tr id="Name">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/io2.fidl;l=23">Name</a></td>
<td>
<code>string</code>[<code><a class='link' href='#MAX_NAME_LENGTH'>MAX_NAME_LENGTH</a></code>]</td>
<td><p>The type for the name of a node, i.e. a single path component.
E.g. <code>foo</code></p>
<h2>Invariants</h2>
<p>A valid node name must meet the following criteria:</p>
<ul>
<li>It cannot be longer than <a class='link' href='#MAX_NAME_LENGTH'>MAX_NAME_LENGTH</a>.</li>
<li>It cannot be empty.</li>
<li>It cannot be &quot;..&quot; (dot-dot).</li>
<li>It cannot be &quot;.&quot; (single dot).</li>
<li>It cannot contain &quot;/&quot;.</li>
<li>It cannot contain embedded NUL.</li>
</ul>
</td>
</tr><tr id="Path">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/io2.fidl;l=44">Path</a></td>
<td>
<code>string</code>[<code><a class='link' href='#MAX_PATH_LENGTH'>MAX_PATH_LENGTH</a></code>]</td>
<td><p>A path is a string of one or more components, separated by &quot;/&quot;.
E.g. <code>foo/bar/baz</code></p>
<h2>Invariants</h2>
<p>A valid path must meet the following criteria:</p>
<ul>
<li>It cannot be empty.</li>
<li>It cannot be longer than <a class='link' href='#MAX_PATH_LENGTH'>MAX_PATH_LENGTH</a>.</li>
<li>It cannot have a leading &quot;/&quot;.</li>
<li>It cannot have a trailing &quot;/&quot;.</li>
<li>Each component must be a valid <a class='link' href='#Name'>Name</a>.</li>
</ul>
<p>Paths should be transformed into their canonical forms at client side.
For example, a client should convert <code>&quot;foo/bar/.././baz/&quot;</code> to <code>&quot;foo/baz&quot;</code>
before using it as a path.</p>
</td>
</tr><tr id="Rights">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/rights-abilities.fidl;l=77">Rights</a></td>
<td>
<code>fuchsia.io2/Operations</code></td>
<td><p>Rights are properties specific to a connection. They limit which operations
are allowed on a connection.</p>
<p>Invoking an operation without the corresponding right results in a
<code>ZX_ERR_ACCESS_DENIED</code> error.</p>
</td>
</tr><tr id="Token">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/io2.fidl;l=51">Token</a></td>
<td>
<code>zx/handle</code></td>
<td><p>The type to identify a connection to a node.
It represents a capability: a reference to a node with associated rights.</p>
</td>
</tr><tr id="Transfer">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.io2/file.fidl;l=16">Transfer</a></td>
<td>
<code>vector</code>[<code><a class='link' href='#MAX_TRANSFER_SIZE'>MAX_TRANSFER_SIZE</a></code>]</td>
<td><p>The byte vector type used for read/write operations.</p>
</td>
</tr></table>