| 703 | } |
| 704 | |
| 705 | WasiExpect<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 | |
| 718 | WasiExpect<void> INode::pathReadlink(std::string Path, Span<char> Buffer, |
| 719 | __wasi_size_t &NRead) const noexcept { |