(cwd)
| 1110 | } |
| 1111 | |
| 1112 | function 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 | |
| 1125 | function hideFile(filePath) { |
| 1126 | if (!IS_WINDOWS) return |
no test coverage detected