lib/utils/fs.js
function ensureFolder(rootFolder) {
    return rmDir(rootFolder)
    .fail(function() {
        return Promise();
    })
    .then(function() {
        return Promise.nfcall(mkdirp, rootFolder);
    });
}
function ensureFolder(rootFolder) {
    return rmDir(rootFolder)
    .fail(function() {
        return Promise();
    })
    .then(function() {
        return Promise.nfcall(mkdirp, rootFolder);
    });
}
function ensureFolder ( rootFolder ) { return rmDir ( rootFolder ) . fail ( function ( ) { return Promise ( ) ; } ) . then ( function ( ) { return Promise . nfcall ( mkdirp , rootFolder ) ; } ) ; }
Ensure that a directory exists and is empty

@param {String} folder
@return {Promise}
Ensure that a directory exists and is empty