pub fn read_file(&self, path: &Path) -> io::Result<Cow<'_, [u8]>> {
        if let Some(ref rubylib) = self.rubylib {
            rubylib
                .read_file(path)
                .or_else(|_| self.memory.read_file(path).or_else(|_| self.native.read_file(path)))
        } else {
            self.memory.read_file(path).or_else(|_| self.native.read_file(path))
        }
    }
/// Read file contents for the file at `path`.
///
/// Returns a byte slice of complete file contents. If `path` is relative,
/// it is absolutized relative to the current working directory of the
/// virtual file system.
///
/// # Errors
///
/// If `path` does not exist, an [`io::Error`] with error kind
/// [`io::ErrorKind::NotFound`] is returned.
Read file contents for the file at `path`.
Returns a byte slice of complete file contents. If `path` is relative,
it is absolutized relative to the current working directory of the
virtual file system.
Read file contents for the file at ` path ` . Returns a byte slice of complete file contents . If ` path ` is relative it is absolutized relative to the current working directory of the virtual file system .
pub fn read_file(&self, path: &Path) -> io::Result<Cow<'_, [u8]>> {
        if let Some(ref rubylib) = self.rubylib {
            rubylib
                .read_file(path)
                .or_else(|_| self.memory.read_file(path).or_else(|_| self.native.read_file(path)))
        } else {
            self.memory.read_file(path).or_else(|_| self.native.read_file(path))
        }
    }
pub fn read_file ( & self , path : & Path ) -> io :: Result < Cow < ' _ , [ u8 ] > > { if let Some ( ref rubylib ) = self . rubylib { rubylib . read_file ( path ) . or_else ( | _ | self . memory . read_file ( path ) . or_else ( | _ | self . native . read_file ( path ) ) ) } else { self . memory . read_file ( path ) . or_else ( | _ | self . native . read_file ( path ) ) } }
Read file contents for the file at `path`.
Read file contents for the file at ` path ` .
&self
path
&Path
errors
If `path` does not exist, an [`io::Error`] with error kind
[`io::ErrorKind::NotFound`] is returned.
If ` path ` does not exist an [ ` io :: Error ` ] with error kind [ ` io :: ErrorKind :: NotFound ` ] is returned .