MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / assertPrivateCapabilityDir

Function assertPrivateCapabilityDir

src/utils/udsMessaging.ts:171–183  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

169}
170
171async function assertPrivateCapabilityDir(dir: string): Promise<void> {
172 let stat: Awaited<ReturnType<typeof lstat>>
173 try {
174 stat = await lstat(dir)
175 } catch (error) {
176 if (!isNotFound(error)) throw error
177 await mkdir(dir, { recursive: true, mode: 0o700 })
178 stat = await lstat(dir)
179 }
180
181 assertPrivateDirectory(stat, dir, 'capability directory')
182 await chmod(dir, 0o700)
183}
184
185function assertPrivateDirectory(
186 stat: Awaited<ReturnType<typeof lstat>>,

Callers 1

writeCapabilityFileFunction · 0.85

Calls 3

isNotFoundFunction · 0.85
mkdirFunction · 0.85
assertPrivateDirectoryFunction · 0.85

Tested by

no test coverage detected