MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / mkdir

Function mkdir

source code/utils/fsOperations.ts:416–427  ·  view source on GitHub ↗
(dirPath, options)

Source from the content-addressed store, hash-verified

414 },
415
416 async mkdir(dirPath, options) {
417 try {
418 await mkdirPromise(dirPath, { recursive: true, ...options })
419 } catch (e) {
420 // Bun/Windows: recursive:true throws EEXIST on directories with the
421 // FILE_ATTRIBUTE_READONLY bit set (Group Policy, OneDrive, desktop.ini).
422 // Bun's directoryExistsAt misclassifies DIRECTORY+READONLY as not-a-dir
423 // (bun-internal src/sys.zig existsAtType). The dir exists; ignore.
424 // https://github.com/anthropics/claude-code/issues/30924
425 if (getErrnoCode(e) !== 'EEXIST') throw e
426 }
427 },
428
429 async readFile(fsPath, options) {
430 return readFilePromise(fsPath, { encoding: options.encoding })

Callers 15

copySnapshotToLocalFunction · 0.85
saveSyncedMetaFunction · 0.85
MemoryFileSelectorFunction · 0.85
createBackupFunction · 0.85
restoreBackupFunction · 0.85
copyFileHistoryForResumeFunction · 0.85
ensureToolResultsDirFunction · 0.85
ensureImageStoreDirFunction · 0.85
extractPDFPagesFunction · 0.85
writeAgentMetadataFunction · 0.85
writeRemoteAgentMetadataFunction · 0.85

Calls 1

getErrnoCodeFunction · 0.85

Tested by

no test coverage detected