From fe473bc987a9a5dfd7ffe91883f8781b910ed45e Mon Sep 17 00:00:00 2001 From: WangRunji Date: Wed, 7 Nov 2018 23:30:00 +0800 Subject: [PATCH] impl File.info() --- src/file.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/file.rs b/src/file.rs index 0796a3b..4fffa58 100644 --- a/src/file.rs +++ b/src/file.rs @@ -1,4 +1,4 @@ -use vfs::{INode, Result}; +use vfs::{INode, Result, FileInfo}; use alloc::sync::Arc; pub struct File { @@ -26,4 +26,8 @@ impl File { self.offset += len; Ok(len) } + + pub fn info(&self) -> Result { + self.inode.info() + } } \ No newline at end of file