wip enchanced vfs

This commit is contained in:
Mackenzie Clark
2019-03-21 08:55:23 -07:00
parent edacb0a8a7
commit 9ed593d7b6
19 changed files with 1805 additions and 148 deletions

View File

@ -0,0 +1,52 @@
use crate::vfs::file_like::{FileLike, Metadata};
use failure::Error;
pub struct Stdin;
pub struct Stdout;
pub struct Stderr;
impl FileLike for Stdin {
fn write(&mut self, buf: &[u8], _count: usize, _offset: usize) -> Result<usize, Error> {
unimplemented!()
}
fn read(&mut self, _buf: &mut [u8]) -> Result<usize, Error> {
unimplemented!()
}
fn close(&self) -> Result<(), Error> {
Ok(())
}
fn metadata(&self) -> Result<Metadata, Error> {
unimplemented!()
}
}
//impl FileLike for Stdout {
// fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error> {
// unimplemented!()
// }
//
// fn close(self) -> Result<(), Error> {
// unimplemented!()
// }
//
// fn metadata(&self) -> Result<Metadata, Error> {
// unimplemented!()
// }
//}
//
//impl FileLike for Stderr {
// fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error> {
// unimplemented!()
// }
//
// fn close(self) -> Result<(), Error> {
// unimplemented!()
// }
//
// fn metadata(&self) -> Result<Metadata, Error> {
// unimplemented!()
// }
//}