MCPcopy
hub / github.com/codeaashu/claude-code / isBlockedDevicePath

Function isBlockedDevicePath

src/tools/FileReadTool/FileReadTool.ts:117–128  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

115])
116
117function isBlockedDevicePath(filePath: string): boolean {
118 if (BLOCKED_DEVICE_PATHS.has(filePath)) return true
119 // /proc/self/fd/0-2 and /proc/<pid>/fd/0-2 are Linux aliases for stdio
120 if (
121 filePath.startsWith('/proc/') &&
122 (filePath.endsWith('/fd/0') ||
123 filePath.endsWith('/fd/1') ||
124 filePath.endsWith('/fd/2'))
125 )
126 return true
127 return false
128}
129
130// Narrow no-break space (U+202F) used by some macOS versions in screenshot filenames
131const THIN_SPACE = String.fromCharCode(8239)

Callers 1

validateInputFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected