MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / validate_path

Function validate_path

document/container/src/lib.rs:166–195  ·  view source on GitHub ↗

Validate that `path` names a container-safe file: relative, no `.`/`..` segments, no backslashes, no redundant separators (`a//b`, `a/b/`). Dotfile names like `.gitignore` are fine. Requiring a canonical form gives a file one identity across backends, some of which key on the raw string rather than path components. Used by backends to block container escapes and by archive codecs on untrusted entr

(path: &str)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 15

validate_prefixFunction · 0.85
resolveMethod · 0.85
readMethod · 0.85
writeMethod · 0.85
appendMethod · 0.85
existsMethod · 0.85
removeMethod · 0.85
readMethod · 0.85
writeMethod · 0.85
appendMethod · 0.85
write_sizedMethod · 0.85

Calls 5

starts_withMethod · 0.80
componentsMethod · 0.80
is_emptyMethod · 0.45
containsMethod · 0.45
lenMethod · 0.45

Tested by 1