MCPcopy Create free account
hub / github.com/codeHappyDananx/SpecWave / ensurePasteDirectory

Function ensurePasteDirectory

electron/main.js:1112–1123  ·  view source on GitHub ↗
(cwd)

Source from the content-addressed store, hash-verified

1110}
1111
1112function ensurePasteDirectory(cwd) {
1113 const dirPath = path.join(cwd, PASTE_IMAGE_DIR)
1114 try {
1115 if (!fs.existsSync(dirPath)) {
1116 fs.mkdirSync(dirPath, { recursive: true })
1117 }
1118 } catch {
1119 return null
1120 }
1121 hideFile(dirPath)
1122 return dirPath
1123}
1124
1125function hideFile(filePath) {
1126 if (!IS_WINDOWS) return

Callers 1

saveClipboardImageFunction · 0.85

Calls 1

hideFileFunction · 0.85

Tested by

no test coverage detected