index.js
function fileExists(file) {
    var fileExists = true;

    try {
        fs.statSync(file, function(err, stat) {
            if (err == null) {
                fileExists = true;
            } else {
                fileExists = false;
            }
        });
    } catch (e) {
        fileExists = false;
    }

    return fileExists;
}
function fileExists(file) {
    var fileExists = true;

    try {
        fs.statSync(file, function(err, stat) {
            if (err == null) {
                fileExists = true;
            } else {
                fileExists = false;
            }
        });
    } catch (e) {
        fileExists = false;
    }

    return fileExists;
}
function fileExists ( file ) { var fileExists = true ; try { fs . statSync ( file , function ( err , stat ) { if ( err == null ) { fileExists = true ; } else { fileExists = false ; } } ) ; } catch ( e ) { fileExists = false ; } return fileExists ; }
Indicates if a given file exists or not
@param {String} file
@return {boolean}
Indicates if a given file exists or not