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

Function readRemoteFile

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

Source from the content-addressed store, hash-verified

60}
61
62function readRemoteFile(sftp: SFTPWrapper, path: string): Promise<string> {
63 return new Promise((resolve, reject) => {
64 sftp.readFile(path, (err, data) => (err ? reject(err) : resolve(data.toString('utf-8'))))
65 })
66}
67
68function writeRemoteFile(sftp: SFTPWrapper, path: string, content: string): Promise<void> {
69 return new Promise((resolve, reject) => {

Callers 1

buildSshToolSpecsFunction · 0.85

Calls 3

readFileMethod · 0.80
resolveFunction · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected