Add path implementation to rand

This commit is contained in:
Jeremy Soller 2017-04-15 09:50:47 -06:00
parent 39e56db812
commit 1664f6cf03

View file

@ -42,6 +42,16 @@ impl SchemeMut for RandScheme {
Ok(i)
}
fn fpath(&mut self, _file: usize, buf: &mut [u8]) -> Result<usize> {
let mut i = 0;
let scheme_path = b"rand";
while i < buf.len() && i < scheme_path.len() {
buf[i] = scheme_path[i];
i += 1;
}
Ok(i)
}
fn close(&mut self, _file: usize) -> Result<usize> {
Ok(0)
}