{"record":{"id":"c0ad48c82e30de7b","repo":"deepseek-ai/deepseek-harness","slug":"fs-not-directory-c0ad48","errorCode":"FS_NOT_DIRECTORY","errorMessage":"cannot list \"${target.displayPath}\": not a directory","messagePattern":"cannot list \"(.+?)\": not a directory","errorType":"exception","errorClass":"FsError","httpStatus":null,"severity":"error","filePath":"packages/fs/fs-local/src/fsio.ts","lineNumber":291,"sourceCode":"\n/**\n * List direct children of a directory in stable name order. Each child includes\n * a resolved target plus stat metadata when still available; file contents are\n * never read.\n * @param target - the resolved directory to list; a missing or non-directory target throws.\n * @param signal - aborts the listing, checked between children (`FS_ABORTED`).\n * @returns one entry per direct child, sorted by name.\n */\nexport async function listDirectory(target: LocalTarget, signal?: AbortSignal): Promise<LocalDirEntry[]> {\n  throwIfAborted(signal, 'list')\n  let info: PathInfo | null\n  try {\n    info = await probe(target.targetKey)\n  } catch (error: unknown) {\n    throw listingIoError(target.displayPath, error)\n  }\n  if (!info) throw new FsError(`cannot list \"${target.displayPath}\": not found`, 'FS_NOT_FOUND')\n  if (info.type !== 'directory') throw new FsError(`cannot list \"${target.displayPath}\": not a directory`, 'FS_NOT_DIRECTORY')\n\n  let entries: Dirent[]\n  try {\n    entries = await readdir(target.targetKey, { withFileTypes: true, encoding: 'utf8' })\n  } catch (error: unknown) {\n    /* v8 ignore next -- requires permission/kernel failure from readdir after a successful directory stat. */\n    throw listingIoError(target.displayPath, error)\n  }\n  throwIfAborted(signal, 'list')\n\n  const result: LocalDirEntry[] = []\n  for (const entry of entries.sort((left, right) => left.name.localeCompare(right.name))) {\n    throwIfAborted(signal, 'list')\n    try {\n      const childTarget = await resolveListedChildTarget(target, entry.name)\n      const childInfo = await probe(childTarget.targetKey)\n      result.push({\n        name: entry.name,","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/fs/fs-local/src/fsio.ts#L273-L309","documentation":"Error \"cannot list \"${target.displayPath}\": not a directory\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/fs/fs-local/src/fsio.ts:291 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}