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

Function sftpReaddir

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

Source from the content-addressed store, hash-verified

348}
349
350function sftpReaddir(sftp: SFTPWrapper, path: string): Promise<SFTPFileEntry[]> {
351 return new Promise<SFTPFileEntry[]>((resolve, reject) => {
352 sftp.readdir(path, (err, list) => {
353 if (err) {
354 reject(mapSftpError('readdir', err));
355 } else {
356 resolve(list as SFTPFileEntry[]);
357 }
358 });
359 });
360}
361
362function sftpMkdir(sftp: SFTPWrapper, path: string): Promise<void> {
363 return new Promise<void>((resolve, reject) => {

Callers 2

iterdirMethod · 0.85
_globWalkMethod · 0.85

Calls 3

rejectFunction · 0.85
mapSftpErrorFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected