mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
Batch rename: imfs -> vfs
This commit is contained in:
parent
24c697bea7
commit
1031600c63
40 changed files with 539 additions and 545 deletions
|
|
@ -1,62 +0,0 @@
|
|||
//! Implements the IMFS fetcher interface for a fake filesystem using Rust's
|
||||
//! std::fs interface.
|
||||
|
||||
// This interface is only used for testing, so it's okay if it isn't used.
|
||||
#![allow(unused)]
|
||||
|
||||
use std::{
|
||||
io,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use crossbeam_channel::Receiver;
|
||||
|
||||
use super::{
|
||||
event::ImfsEvent,
|
||||
fetcher::{FileType, ImfsFetcher},
|
||||
};
|
||||
|
||||
pub struct NoopFetcher;
|
||||
|
||||
impl ImfsFetcher for NoopFetcher {
|
||||
fn file_type(&mut self, _path: &Path) -> io::Result<FileType> {
|
||||
Err(io::Error::new(
|
||||
io::ErrorKind::NotFound,
|
||||
"NoopFetcher always returns NotFound",
|
||||
))
|
||||
}
|
||||
|
||||
fn read_children(&mut self, _path: &Path) -> io::Result<Vec<PathBuf>> {
|
||||
Err(io::Error::new(
|
||||
io::ErrorKind::NotFound,
|
||||
"NoopFetcher always returns NotFound",
|
||||
))
|
||||
}
|
||||
|
||||
fn read_contents(&mut self, _path: &Path) -> io::Result<Vec<u8>> {
|
||||
Err(io::Error::new(
|
||||
io::ErrorKind::NotFound,
|
||||
"NoopFetcher always returns NotFound",
|
||||
))
|
||||
}
|
||||
|
||||
fn create_directory(&mut self, _path: &Path) -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn write_file(&mut self, _path: &Path, _contents: &[u8]) -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn remove(&mut self, _path: &Path) -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn watch(&mut self, _path: &Path) {}
|
||||
|
||||
fn unwatch(&mut self, _path: &Path) {}
|
||||
|
||||
fn receiver(&self) -> Receiver<ImfsEvent> {
|
||||
crossbeam_channel::never()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue