(
dirfd: Fd,
path: P,
mut buf: Buf,
)
| 174 | #[cfg(not(target_os = "redox"))] |
| 175 | #[inline] |
| 176 | pub fn readlinkat_raw<P: path::Arg, Fd: AsFd, Buf: Buffer<u8>>( |
| 177 | dirfd: Fd, |
| 178 | path: P, |
| 179 | mut buf: Buf, |
| 180 | ) -> io::Result<Buf::Output> { |
| 181 | // SAFETY: `readlinkat` behaves. |
| 182 | let len = path.into_with_c_str(|path| unsafe { |
| 183 | backend::fs::syscalls::readlinkat(dirfd.as_fd(), path, buf.parts_mut()) |
| 184 | })?; |
| 185 | // SAFETY: `readlinkat` behaves. |
| 186 | unsafe { Ok(buf.assume_init(len)) } |
| 187 | } |
| 188 | |
| 189 | /// `mkdirat(fd, path, mode)`—Creates a directory. |
| 190 | /// |