pub async fn read_file(&self, filename: &str) -> Result<String, Error> {
        let file = self.open_file(filename)?;
        let data = file.read_string().await?;
        file.close().await?;
        Ok(data)
    }
// Returns the contents of a file in this directory as a string
Returns the contents of a file in this directory as a string
Returns the contents of a file in this directory as a string
pub async fn read_file(&self, filename: &str) -> Result<String, Error> {
        let file = self.open_file(filename)?;
        let data = file.read_string().await?;
        file.close().await?;
        Ok(data)
    }
pub async fn read_file ( & self , filename : & str ) -> Result < String , Error > { let file = self . open_file ( filename ) ? ; let data = file . read_string ( ) . await ? ; file . close ( ) . await ? ; Ok ( data ) }
Returns the contents of a file in this directory as a string
Returns the contents of a file in this directory as a string
&self
filename
&str
&self
filename
&str