MCPcopy Index your code
hub / github.com/simstudioai/sim / writeRemoteFile

Function writeRemoteFile

apps/sim/executor/handlers/pi/ssh-tools.ts:68–72  ·  view source on GitHub ↗
(sftp: SFTPWrapper, path: string, content: string)

Source from the content-addressed store, hash-verified

66}
67
68function writeRemoteFile(sftp: SFTPWrapper, path: string, content: string): Promise<void> {
69 return new Promise((resolve, reject) => {
70 sftp.writeFile(path, content, (err) => (err ? reject(err) : resolve()))
71 })
72}
73
74/** Resolves a tool-supplied path against `repoPath`, rejecting traversal/escape. */
75function resolveRepoPath(repoPath: string, candidate: string): string {

Callers 1

buildSshToolSpecsFunction · 0.85

Calls 2

writeFileMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected