You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: memory.rs
    path of file: ./repos/biome/crates/biome_fs/src/fs
    
    the code of the file until where you have to start completion: use oxc_resolver::{Resolution, ResolveError};
use rustc_hash::FxHashMap;
use std::collections::hash_map::{Entry, IntoIter};
use std::io;
use std::panic::{AssertUnwindSafe, RefUnwindSafe};
use std::path::{Path, PathBuf};
use std::str;
use std::sync::Arc;

use biome_diagnostics::{Error, Severity};
use parking_lot::{lock_api::ArcMutexGuard, Mutex, RawMutex, RwLock};

use crate::fs::OpenOptions;
use crate::{BiomePath, FileSystem, TraversalContext, TraversalScope};

use super::{BoxedTraversal, ErrorKind, File, FileSystemDiagnostic};

type OnGetChangedFiles = Option<
    Arc<
        AssertUnwindSafe<
            Mutex<Option<Box<dyn FnOnce() -> Vec<String> + Send + 'static + RefUnwindSafe>>>,
        >,
    >,
>;

/// Fully in-memory file system, stores the content of all known files in a hashmap
pub struct MemoryFileSystem {
    files: AssertUnwindSafe<RwLock
    
    fn spawn(&self, ctx: &'scope dyn TraversalContext, base: PathBuf) {
        // Traversal is implemented by iterating on all keys, and matching on
        // those that are prefixed with the provided `base` path
        {
            let files = &self.fs.files.0.read();
            for path in files.keys() {
                let should_process_file = if base.starts_with(".") || base.starts_with("./") {
                    // we simulate absolute paths, so we can correctly strips out the base path from the path
                    let absolute_base = PathBuf::from("/").join(&base);
                    let absolute_path = Path::new("/").join(path);
                    absolute_path.strip_prefix(&absolute_base).is_ok()
                } else {
                    path.strip_prefix(&base).is_ok()
                };

                if should_process_file {
                    let _ = ctx.interner().intern_path(path.into());
                    let biome_path = BiomePath::new(path);
                    if !ctx.can_handle(&biome_path) {
                        continue;
                    }
                    ctx.handle_file(path);
                }
            }
        }

        for (path, entry) in &self.fs.errors {
            if path.strip_prefix(&base).is_ok() {
                ctx.push_diagnostic(Error::from(FileSystemDiagnostic {
                    path: path.to_string_lossy().to_string(),
                    error_kind: match entry {
                        ErrorEntry::UnknownFileType => ErrorKind::UnknownFileType,
                        ErrorEntry::DereferencedSymlink(path) => {
                            ErrorKind::DereferencedSymlink(path.to_string_lossy().to_string())
                        }
                        ErrorEntry::DeeplyNestedSymlinkExpansion(path) => {
                            ErrorKind::DeeplyNestedSymlinkExpansion(
                                path.to_string_lossy().to_string(),
                            )
                        }
                    },
                    severity: Severity::Warning,
                }));
            }
        }
    }