pub fn new_remote_file(
current_task: &CurrentTask,
handle: NullableHandle,
flags: OpenFlags,
) -> Result<FileHandle, Errno>Expand description
Creates a FileHandle from a zx::NullableHandle.
The handle must be a channel, socket, vmo, debuglog, or counter object. If the handle is a
channel, then the channel must implement the fuchsia.unknown/Queryable protocol. Not all
protocols are supported; files, directories, and sockets are, but symlinks are not.
The resulting object will be owned by root, and will have permissions derived from the flags
used to open this object. This is not the same as the permissions set if the object was created
using Starnix itself. We use this mainly for interfacing with objects created outside of Starnix
where these flags represent the desired permissions already.