MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / needs_escaping

Method needs_escaping

atomic-repository/src/repository/project_tree.rs:119–123  ·  view source on GitHub ↗

Whether this path's canonical String identity needs escaping: any non-ASCII-graphic byte, or a literal `%` (which would make the escape scheme ambiguous). A plain printable-UTF-8 path without `%` passes through unchanged; everything else carries the injective `%XX` reversible form.

(&self)

Source from the content-addressed store, hash-verified

117 /// through unchanged; everything else carries the injective `%XX`
118 /// reversible form.
119 pub fn needs_escaping(&self) -> bool {
120 self.0
121 .iter()
122 .any(|byte| !byte.is_ascii_graphic() || *byte == b'%')
123 }
124}
125
126/// The canonical reversible escape for repository path bytes (review CB-9C

Callers

nothing calls this directly

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected