lib/desktop.js
function isEmptySync(searchPath) {
    let stat;
    try {
        stat = fs.statSync(searchPath);
    } catch (e) {
        return true;
    }
    if (stat.isDirectory()) {
        const items = fs.readdirSync(searchPath);
        return !items || !items.length;
    }
    return false;
}
function isEmptySync(searchPath) {
    let stat;
    try {
        stat = fs.statSync(searchPath);
    } catch (e) {
        return true;
    }
    if (stat.isDirectory()) {
        const items = fs.readdirSync(searchPath);
        return !items || !items.length;
    }
    return false;
}
function isEmptySync ( searchPath ) { let stat ; try { stat = fs . statSync ( searchPath ) ; } catch ( e ) { return true ; } if ( stat . isDirectory ( ) ) { const items = fs . readdirSync ( searchPath ) ; return ! items || ! items . length ; } return false ; }
Checks if the path is empty.
@param {string} searchPath
@returns {boolean}
Checks if the path is empty .