Impl Ref::is_ref_to_file()

This commit is contained in:
Matthias Beyer 2016-06-23 14:17:48 +02:00
parent 904d81595b
commit ca48e2ac39

View file

@ -199,8 +199,8 @@ impl<'a> Ref<'a> {
}
/// Alias for `r.fs_link_exists() && r.deref().is_file()`
pub fn is_ref_to_file(&self) -> bool {
unimplemented!()
pub fn is_ref_to_file(&self) -> Result<bool> {
self.fs_file().map(|pathbuf| pathbuf.is_file())
}
/// Alias for `r.fs_link_exists() && r.deref().is_dir()`