Flesh out crate

This commit is contained in:
Lucien Greathouse
2020-02-18 23:16:56 -08:00
parent b4963f4ff7
commit 52e1dbd846
7 changed files with 95 additions and 5 deletions

View File

@@ -1,8 +1,9 @@
use std::io;
use std::path::Path;
use crate::{Metadata, ReadDir, VfsBackend};
use crate::{Metadata, ReadDir, VfsBackend, VfsEvent};
/// `VfsBackend` that returns an error on every operation.
#[non_exhaustive]
pub struct NoopBackend;
@@ -41,6 +42,10 @@ impl VfsBackend for NoopBackend {
))
}
fn event_receiver(&mut self) -> crossbeam_channel::Receiver<VfsEvent> {
crossbeam_channel::never()
}
fn watch(&mut self, _path: &Path) -> io::Result<()> {
Err(io::Error::new(
io::ErrorKind::Other,