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

Function writePrivateFileExclusive

src/utils/udsMessaging.ts:213–224  ·  view source on GitHub ↗
(
  path: string,
  content: string,
)

Source from the content-addressed store, hash-verified

211}
212
213async function writePrivateFileExclusive(
214 path: string,
215 content: string,
216): Promise<void> {
217 const handle = await open(path, 'wx', 0o600)
218 try {
219 await handle.writeFile(content, 'utf-8')
220 } finally {
221 await handle.close()
222 }
223 await chmod(path, 0o600)
224}
225
226async function ensureSocketParent(path: string): Promise<void> {
227 const dir = dirname(path)

Callers 1

writeCapabilityFileFunction · 0.85

Calls 2

closeMethod · 0.65
openFunction · 0.50

Tested by

no test coverage detected