[go: up one dir, main page]

tokio 1.48.0

An event-driven, non-blocking I/O platform for writing asynchronous I/O backed applications.
Documentation
1
2
3
4
5
6
use std::os::unix::ffi::OsStrExt;
use std::{ffi::CString, io, path::Path};

pub(crate) fn cstr(p: &Path) -> io::Result<CString> {
    Ok(CString::new(p.as_os_str().as_bytes())?)
}