mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
14 lines
313 B
JavaScript
14 lines
313 B
JavaScript
const path = require('path')
|
|
const fs = require('fs').promises
|
|
|
|
const emitDirPath = path.resolve(__dirname, 'tmp')
|
|
exports.emitDirPath = emitDirPath
|
|
|
|
async function checkEmitDir() {
|
|
try {
|
|
await fs.mkdir(emitDirPath)
|
|
} catch (err) {
|
|
await fs.stat(emitDirPath)
|
|
}
|
|
}
|
|
exports.checkEmitDir = checkEmitDir
|