read_to_string

Function read_to_string 

Source
pub async fn read_to_string(path: impl AsRef<Path>) -> Result<String, Error>
Expand description

Read the entire contents of a file into a string.

This function supports opening compressed files transparently.

The API mirrors the function in tokio::fs::read_to_string but is implemented via crate::fs::read_to_string.