MCPcopy Create free account
hub / github.com/cogentcore/core / EscapePathName

Function EscapePathName

tree/nodebase.go:222–224  ·  view source on GitHub ↗

Paths: TODO: is this the best way to escape paths? EscapePathName returns a name that replaces any / with \\

(name string)

Source from the content-addressed store, hash-verified

220
221// EscapePathName returns a name that replaces any / with \\
222func EscapePathName(name string) string {
223 return strings.ReplaceAll(name, "/", `\\`)
224}
225
226// UnescapePathName returns a name that replaces any \\ with /
227func UnescapePathName(name string) string {

Callers 2

PathMethod · 0.85
PathFromMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected