Function
linkat
(
old_dirfd: PFd,
old_path: P,
new_dirfd: QFd,
new_path: Q,
flags: AtFlags,
)
Source from the content-addressed store, hash-verified
| 212 | #[cfg(not(any(target_os = "espidf", target_os = "redox")))] |
| 213 | #[inline] |
| 214 | pub fn linkat<P: path::Arg, Q: path::Arg, PFd: AsFd, QFd: AsFd>( |
| 215 | old_dirfd: PFd, |
| 216 | old_path: P, |
| 217 | new_dirfd: QFd, |
| 218 | new_path: Q, |
| 219 | flags: AtFlags, |
| 220 | ) -> io::Result<()> { |
| 221 | old_path.into_with_c_str(|old_path| { |
| 222 | new_path.into_with_c_str(|new_path| { |
| 223 | backend::fs::syscalls::linkat( |
| 224 | old_dirfd.as_fd(), |
| 225 | old_path, |
| 226 | new_dirfd.as_fd(), |
| 227 | new_path, |
| 228 | flags, |
| 229 | ) |
| 230 | }) |
| 231 | }) |
| 232 | } |
| 233 | |
| 234 | /// `unlinkat(fd, path, flags)`—Unlinks a file or remove a directory. |
| 235 | /// |