MCPcopy
hub / github.com/claude-code-best/claude-code / isMemoryFilePath

Function isMemoryFilePath

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

Source from the content-addressed store, hash-verified

1432 * Check if a file path is a memory file (CLAUDE.md, CLAUDE.local.md, or .claude/rules/*.md)
1433 */
1434export function isMemoryFilePath(filePath: string): boolean {
1435 const name = basename(filePath)
1436 const normalizedPath = normalizePathForComparison(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 (name.endsWith('.md') && normalizedPath.includes('/.claude/rules/')) {
1445 return true
1446 }
1447
1448 return false
1449}
1450
1451/**
1452 * Get all memory file paths from both standard discovery and readFileState.

Callers 3

claudemd.test.tsFile · 0.90
getAllMemoryFilePathsFunction · 0.85

Calls 1

Tested by

no test coverage detected