Struct gitbrowse::File [−][src]
pub struct File<'a> { /* fields omitted */ }
A reference to a file on a certain commit.
Implementations
impl<'a> File<'a>
[src]
impl<'a> File<'a>
[src]pub fn is_file(&self) -> bool
[src]
pub fn is_file(&self) -> bool
[src]Returns true
if the selected file is an actual file. See also File::is_dir.
pub fn is_dir(&self) -> bool
[src]
pub fn is_dir(&self) -> bool
[src]Returns true
if the selected file is a directory. See also File::is_file.
pub fn read_content_string(&self) -> Result<String, Error>
[src]
pub fn read_content_string(&self) -> Result<String, Error>
[src]Read the contents of the file as a string. Will use a lossy encoding. See String::from_utf8_lossy for more information.