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

Function sftpStat

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

Source from the content-addressed store, hash-verified

319}
320
321function sftpStat(sftp: SFTPWrapper, path: string): Promise<SFTPStats> {
322 return new Promise<SFTPStats>((resolve, reject) => {
323 sftp.stat(path, (err, stats) => {
324 if (err) {
325 reject(mapSftpError('stat', err));
326 } else {
327 resolve(stats);
328 }
329 });
330 });
331}
332
333function sftpLstat(sftp: SFTPWrapper, path: string): Promise<SFTPStats> {
334 return new Promise<SFTPStats>((resolve, reject) => {

Callers 5

createMethod · 0.85
chdirMethod · 0.85
statMethod · 0.85
mkdirMethod · 0.85
_mkdirRecursiveMethod · 0.85

Calls 4

rejectFunction · 0.85
mapSftpErrorFunction · 0.85
statMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected