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

Function realpath

packages/kaos/test/e2e/ssh-resolve-path.test.ts:53–59  ·  view source on GitHub ↗
(path: string, cb: (err: unknown, absPath: string) => void)

Source from the content-addressed store, hash-verified

51 // Only stub the SFTP methods used by the tests below.
52 const sftp = {
53 realpath(path: string, cb: (err: unknown, absPath: string) => void): void {
54 state.calls.push({ method: 'realpath', path });
55 // Mock realpath: if path is already absolute, echo it.
56 // Otherwise it would be relative — but since SSHKaos always
57 // resolves first, we should never see a relative input here.
58 cb(null, path);
59 },
60 stat(path: string, cb: (err: unknown, stats: SFTPStats) => void): void {
61 state.calls.push({ method: 'stat', path });
62 if (state.dirs.has(path)) {

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected