MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isMemoryFilePath

Function isMemoryFilePath

src/utils/claudemd.ts:1435–1452  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

1433 * Check if a file path is a memory file (CLAUDE.md, CLAUDE.local.md, or .claude/rules/*.md)
1434 */
1435export function isMemoryFilePath(filePath: string): boolean {
1436 const name = basename(filePath)
1437
1438 // CLAUDE.md or CLAUDE.local.md anywhere
1439 if (name === 'CLAUDE.md' || name === 'CLAUDE.local.md') {
1440 return true
1441 }
1442
1443 // .md files in .claude/rules/ directories
1444 if (
1445 name.endsWith('.md') &&
1446 filePath.includes(`${sep}.claude${sep}rules${sep}`)
1447 ) {
1448 return true
1449 }
1450
1451 return false
1452}
1453
1454/**
1455 * Get all memory file paths from both standard discovery and readFileState.

Callers 1

getAllMemoryFilePathsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected