(
path: P,
name: Name,
mut value: Buf,
)
| 63 | /// [Linux]: https://man7.org/linux/man-pages/man2/lgetxattr.2.html |
| 64 | #[inline] |
| 65 | pub fn lgetxattr<P: path::Arg, Name: path::Arg, Buf: Buffer<u8>>( |
| 66 | path: P, |
| 67 | name: Name, |
| 68 | mut value: Buf, |
| 69 | ) -> io::Result<Buf::Output> { |
| 70 | path.into_with_c_str(|path| { |
| 71 | name.into_with_c_str(|name| { |
| 72 | // SAFETY: `lgetxattr` behaves. |
| 73 | let len = unsafe { backend::fs::syscalls::lgetxattr(path, name, value.parts_mut())? }; |
| 74 | // SAFETY: `lgetxattr` behaves. |
| 75 | unsafe { Ok(value.assume_init(len)) } |
| 76 | }) |
| 77 | }) |
| 78 | } |
| 79 | |
| 80 | /// `fgetxattr(fd, name, value.as_ptr(), value.len())`—Get extended |
| 81 | /// filesystem attributes on an open file descriptor. |
nothing calls this directly
no test coverage detected