Records

Functions

  • zx::result<fbl::RefPtr<fdio>> CreateLocalConnection (fbl::RefPtr<const fdio_namespace> fs, fbl::RefPtr<LocalVnode> vn)

    Create an |fdio_t| with a const view of a local node in the namespace.

    This object holds strong references to both the local node and local

    filesystem, which are released on |fdio_t|'s close method.

    On failure, nullptr is returned.

    Defined at line 137 of file ../../sdk/lib/fdio/namespace/local-connection.cc

  • fuchsia_io::wire::Flags TranslateDeprecatedFlags (fuchsia_io::wire::OpenFlags deprecated_flags)

    Translates deprecated `fuchsia.io/OpenFlags` to an equivalent set of `fuchsia.io/Flags`.

    Defined at line 163 of file ../../sdk/lib/fdio/unistd.cc

  • fbl::RefPtr<LocalVnode> GetLocalNodeFromConnectionIfAny (fdio_t * io)

    If |io| is a connection to a local Vnode, returns a reference to that LocalVnode.

    Otherwise, returns nullptr.

    Defined at line 151 of file ../../sdk/lib/fdio/namespace/local-connection.cc

  • bool CleanPath (const char * in, PathBuffer * out, bool * is_dir)

    Cleans an input path, transforming it to out, according to the

    rules defined by "Lexical File Names in Plan 9 or Getting Dot-Dot Right",

    accessible at: https://9p.io/sys/doc/lexnames.html

    Code heavily inspired by Go's filepath.Clean function, from:

    https://golang.org/src/path/filepath/path.go

    If the input cannot be parsed, returns false. Otherwise populates |out| with

    a clean path and sets is_dir to 'true' if the path is a directory.

    Defined at line 21 of file ../../sdk/lib/fdio/cleanpath.cc

  • zx::result<fbl::RefPtr<fdio>> OpenAt (int dirfdconst char * pathfuchsia_io::Flags flagsOpenAtOptions options)

    Implements openat logic.

    Defined at line 329 of file ../../sdk/lib/fdio/unistd.cc