From ca48e2ac39b63b55e4a274e8d712ed024f132e78 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 23 Jun 2016 14:17:48 +0200 Subject: [PATCH] Impl Ref::is_ref_to_file() --- libimagref/src/reference.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libimagref/src/reference.rs b/libimagref/src/reference.rs index 7655cc1b..7121fcec 100644 --- a/libimagref/src/reference.rs +++ b/libimagref/src/reference.rs @@ -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 { + self.fs_file().map(|pathbuf| pathbuf.is_file()) } /// Alias for `r.fs_link_exists() && r.deref().is_dir()`