file_get_async

Function file_get_async 

Source
pub async fn file_get_async<P: AsRef<Path>>(
    path: P,
    base_path: Option<&str>,
) -> Result<String>
Expand description

Async version of file_get that reads file contents asynchronously

§Arguments

  • path - Path to the file to read
  • base_path - Optional base path for security checking

§Returns

  • Ok(String) - The file contents
  • Err(io::Error) - If the file can’t be read