MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / is_within_root

Function is_within_root

crates/opencode-server/src/routes.rs:2930–2932  ·  view source on GitHub ↗
(path: &FsPath, root: &FsPath)

Source from the content-addressed store, hash-verified

2928}
2929
2930fn is_within_root(path: &FsPath, root: &FsPath) -> bool {
2931 canonicalize_within_root(path, root).is_ok()
2932}
2933
2934async fn list_files(Query(query): Query<ListFilesQuery>) -> Result<Json<Vec<FileInfo>>> {
2935 let root = project_root()?;

Callers 3

list_filesFunction · 0.85
search_recursiveFunction · 0.85
find_recursiveFunction · 0.85

Calls 1

canonicalize_within_rootFunction · 0.85

Tested by

no test coverage detected