const fs = require('fs')

function dirExist(path) {
    try {
        fs.accessSync(path, fs.constants.F_OK)
        return true
    } catch (err) {
        console.error('Directory does not exist')
    }
    return false
}

module.exports = dirExist

