.cargo/vendor/rustix/src/fs/getpath.rs
raw| 1 | use crate::ffi::CString; |
| 2 | use crate::{backend, io}; |
| 3 | use backend::fd::AsFd; |
| 4 | |
| 5 | /// `fcntl(fd, F_GETPATH)` |
| 6 | /// |
| 7 | /// # References |
| 8 | /// - [Apple] |
| 9 | /// |
| 10 | /// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fcntl.2.html |
| 11 | #[inline] |
| 12 | pub fn getpath<Fd: AsFd>(fd: Fd) -> io::Result<CString> { |
| 13 | backend::fs::syscalls::getpath(fd.as_fd()) |
| 14 | } |