(
path: P,
name: Name,
mut value: Buf,
)
| 39 | /// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getxattr.2.html |
| 40 | #[inline] |
| 41 | pub fn getxattr<P: path::Arg, Name: path::Arg, Buf: Buffer<u8>>( |
| 42 | path: P, |
| 43 | name: Name, |
| 44 | mut value: Buf, |
| 45 | ) -> io::Result<Buf::Output> { |
| 46 | path.into_with_c_str(|path| { |
| 47 | name.into_with_c_str(|name| { |
| 48 | // SAFETY: `getxattr` behaves. |
| 49 | let len = unsafe { backend::fs::syscalls::getxattr(path, name, value.parts_mut())? }; |
| 50 | // SAFETY: `getxattr` behaves. |
| 51 | unsafe { Ok(value.assume_init(len)) } |
| 52 | }) |
| 53 | }) |
| 54 | } |
| 55 | |
| 56 | /// `lgetxattr(path, name, value.as_ptr(), value.len())`—Get extended |
| 57 | /// filesystem attributes, without following symlinks in the last path |
nothing calls this directly
no test coverage detected