MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / escapeCh

Method escapeCh

src/fileSystem/sftp.js:498–498  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

496 */
497 #safeName(name) {
498 const escapeCh = (str) => str.replace(/\\([^])|([`"])/g, "\\$1$2");
499 const ar = name.split("/");
500 return ar.map((dirname) => escapeCh(dirname)).join("/");
501 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected