tokio-fs-ext 0.7.5

Extend tokio fs to be compatible with native and wasm
Documentation
1
2
3
4
5
6
7
use std::{io, path::Path};

use super::read;

pub async fn read_to_string(path: impl AsRef<Path>) -> io::Result<String> {
    String::from_utf8(read(path).await?).map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))
}