{"record":{"id":"cbc70224dd6b10ae","repo":"biomejs/biome","slug":"path-path-does-not-exists-in-memory-filesystem","errorCode":null,"errorMessage":"path {path:?} does not exists in memory filesystem","messagePattern":"path (.+?) does not exists in memory filesystem","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"crates/biome_fs/src/fs/memory.rs","lineNumber":174,"sourceCode":"                    if options.create {\n                        // If `create` is true, truncate the file\n                        let entry = entry.into_mut();\n                        *entry = Arc::new(Mutex::new(vec![]));\n                        entry.lock_arc()\n                    } else {\n                        // This branch can only be reached if `create_new` was true,\n                        // we should return an error if the file already exists\n                        return Err(io::Error::new(\n                            io::ErrorKind::AlreadyExists,\n                            format!(\"path {path:?} already exists in memory filesystem\"),\n                        ));\n                    }\n                }\n            }\n        } else {\n            let files = self.files.0.read();\n            let entry = files.get(path).ok_or_else(|| {\n                io::Error::new(\n                    io::ErrorKind::NotFound,\n                    format!(\"path {path:?} does not exists in memory filesystem\"),\n                )\n            })?;\n\n            entry.lock_arc()\n        };\n\n        if options.truncate {\n            // Clear the buffer if the file was open with `truncate`\n            inner.clear();\n        }\n\n        Ok(Box::new(MemoryFile {\n            inner,\n            can_read: options.read,\n            can_write: options.write,\n            version: 0,","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/biomejs/biome/blob/405dedb0ff65dd29927faf587f6542e3c29db248/crates/biome_fs/src/fs/memory.rs#L156-L192","documentation":"Error \"path {path:?} does not exists in memory filesystem\" thrown in biomejs/biome.","triggerScenarios":"Thrown at crates/biome_fs/src/fs/memory.rs:174 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the file first (with `create` or `create_new`) before opening it without create options.","Verify the path with `path_exists` before opening."],"exampleFix":"let file = fs.open_with_options(path, OpenOptions::default().create(true).write(true))?;","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"405dedb0ff65dd29927faf587f6542e3c29db248","analyzedAt":"2026-08-20T00:25:09.682Z","contentChangedAt":"2026-08-20T00:25:09.682Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}