MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / sftpAppendFile

Function sftpAppendFile

packages/kaos/src/ssh.ts:406–416  ·  view source on GitHub ↗
(sftp: SFTPWrapper, path: string, data: string | Buffer)

Source from the content-addressed store, hash-verified

404}
405
406function sftpAppendFile(sftp: SFTPWrapper, path: string, data: string | Buffer): Promise<void> {
407 return new Promise<void>((resolve, reject) => {
408 sftp.appendFile(path, data, (err) => {
409 if (err) {
410 reject(mapSftpError('appendFile', err));
411 } else {
412 resolve();
413 }
414 });
415 });
416}
417
418function clientExec(client: Client, command: string): Promise<ClientChannel> {
419 return new Promise<ClientChannel>((resolve, reject) => {

Callers 1

writeTextMethod · 0.85

Calls 3

rejectFunction · 0.85
mapSftpErrorFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected