MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / pathOpen

Method pathOpen

lib/host/wasi/inode-macos.cpp:705–716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705WasiExpect<INode> INode::pathOpen(std::string Path, __wasi_oflags_t OpenFlags,
706 __wasi_fdflags_t FdFlags,
707 VFS::Flags VFSFlags) const noexcept {
708 const int Flags = openFlags(OpenFlags, FdFlags, VFSFlags);
709
710 if (auto NewFd = ::openat(Fd, Path.c_str(), Flags, 0644);
711 unlikely(NewFd < 0)) {
712 return WasiUnexpect(fromErrNo(errno));
713 } else {
714 return INode(NewFd);
715 }
716}
717
718WasiExpect<void> INode::pathReadlink(std::string Path, Span<char> Buffer,
719 __wasi_size_t &NRead) const noexcept {

Callers

nothing calls this directly

Calls 6

unlikelyFunction · 0.85
WasiUnexpectFunction · 0.85
c_strMethod · 0.80
openFlagsFunction · 0.70
fromErrNoFunction · 0.70
INodeFunction · 0.50

Tested by

no test coverage detected