src/utils.js
/**
 * Check whether the passed file path refers to a folder or not.
 *
 * @returns {QPromise} A promise holding a boolean value that indicates whether the passed directory path refers to a
 *          directory or not.
 * @param {string} directoryPath The path that is checked.
 */
Check whether the passed file path refers to a folder or not.
@returns {QPromise} A promise holding a boolean value that indicates whether the passed directory path refers to a
directory or not.
@param {string} directoryPath The path that is checked.
Check whether the passed file path refers to a folder or not . @returns { QPromise } A promise holding a boolean value that indicates whether the passed directory path refers to a directory or not . @param { string } directoryPath The path that is checked .
function isDirectory (directoryPath) {
    var deferred = Q.defer();
    fs.stat(directoryPath, function (err, stats) {
        if (err &&  (err).code !== 'ENOENT') deferred.reject(err);
        else if (err) deferred.resolve(false);
        else deferred.resolve(stats.isDirectory());
    });
    return deferred.promise;
}
function isDirectory ( directoryPath ) { var deferred = Q . defer ( ) ; fs . stat ( directoryPath , function ( err , stats ) { if ( err && ( err ) . code !== 'ENOENT' ) deferred . reject ( err ) ; else if ( err ) deferred . resolve ( false ) ; else deferred . resolve ( stats . isDirectory ( ) ) ; } ) ; return deferred . promise ; }
Check whether the passed file path refers to a folder or not.
Check whether the passed file path refers to a folder or not .
/** @type {{code: string}} */