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

Function isNotFound

apps/kimi-code/src/utils/persistence.ts:14–18  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

12import type { z } from 'zod';
13
14function isNotFound(error: unknown): boolean {
15 return (
16 typeof error === 'object' && error !== null && (error as { code?: string }).code === 'ENOENT'
17 );
18}
19
20function assertNonConfigWrite(filePath: string): void {
21 if (basename(filePath) === 'config.toml') {

Callers 2

readJsonFileFunction · 0.70
readJsonlFileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected