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

Method pathReadlink

lib/host/wasi/inode-linux.cpp:766–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

764}
765
766WasiExpect<void> INode::pathReadlink(std::string Path, Span<char> Buffer,
767 __wasi_size_t &NRead) const noexcept {
768 if (auto Res = ::readlinkat(Fd, Path.c_str(), Buffer.data(), Buffer.size());
769 unlikely(Res < 0)) {
770 return WasiUnexpect(fromErrNo(errno));
771 } else {
772 NRead = EndianValue(static_cast<__wasi_size_t>(Res)).le();
773 }
774
775 return {};
776}
777
778WasiExpect<void> INode::pathRemoveDirectory(std::string Path) const noexcept {
779 if (auto Res = ::unlinkat(Fd, Path.c_str(), AT_REMOVEDIR);

Callers

nothing calls this directly

Calls 8

unlikelyFunction · 0.85
WasiUnexpectFunction · 0.85
EndianValueClass · 0.85
c_strMethod · 0.80
leMethod · 0.80
fromErrNoFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected