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

Function sftpRealpath

packages/kaos/src/ssh.ts:309–319  ·  view source on GitHub ↗
(sftp: SFTPWrapper, path: string)

Source from the content-addressed store, hash-verified

307// this was hoisted into the helpers.
308
309function sftpRealpath(sftp: SFTPWrapper, path: string): Promise<string> {
310 return new Promise<string>((resolve, reject) => {
311 sftp.realpath(path, (err, absPath) => {
312 if (err) {
313 reject(mapSftpError('realpath', err));
314 } else {
315 resolve(absPath);
316 }
317 });
318 });
319}
320
321function sftpStat(sftp: SFTPWrapper, path: string): Promise<SFTPStats> {
322 return new Promise<SFTPStats>((resolve, reject) => {

Callers 2

createMethod · 0.85
chdirMethod · 0.85

Calls 3

rejectFunction · 0.85
mapSftpErrorFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected