pub async fn write<P>(path: P, data: &'_ [u8]) -> Result<(), IoError> where
    P: Clone + AsRef<Path>,