lib/main.js
function(languageSlug, projectSlug, resourceSlug) {
        return new Promise(function(resolve, reject) {
                try {
                    resolve(library.public_getters.getResource(languageSlug, projectSlug, resourceSlug));
                } catch(err) {
                    reject(err);
                }
            })
            .then(function(resource) {
                if(!resource) return Promise.reject(new Error('Unknown resource'));
                let containerSlug = rc.tools.makeSlug(languageSlug, projectSlug, resourceSlug);
                let directory = path.join(resourceDir, containerSlug);
                opts.clean = true; // remove the directory once closed.
                return rc.close(directory, opts);
            });
    }
function(languageSlug, projectSlug, resourceSlug) {
        return new Promise(function(resolve, reject) {
                try {
                    resolve(library.public_getters.getResource(languageSlug, projectSlug, resourceSlug));
                } catch(err) {
                    reject(err);
                }
            })
            .then(function(resource) {
                if(!resource) return Promise.reject(new Error('Unknown resource'));
                let containerSlug = rc.tools.makeSlug(languageSlug, projectSlug, resourceSlug);
                let directory = path.join(resourceDir, containerSlug);
                opts.clean = true; // remove the directory once closed.
                return rc.close(directory, opts);
            });
    }
function ( languageSlug , projectSlug , resourceSlug ) { return new Promise ( function ( resolve , reject ) { try { resolve ( library . public_getters . getResource ( languageSlug , projectSlug , resourceSlug ) ) ; } catch ( err ) { reject ( err ) ; } } ) . then ( function ( resource ) { if ( ! resource ) return Promise . reject ( new Error ( 'Unknown resource' ) ) ; let containerSlug = rc . tools . makeSlug ( languageSlug , projectSlug , resourceSlug ) ; let directory = path . join ( resourceDir , containerSlug ) ; opts . clean = true ; // remove the directory once closed. return rc . close ( directory , opts ) ; } ) ; }
Closes a resource container archive.

@param languageSlug {string}
@param projectSlug {string}
@param resourceSlug {string}
@returns {Promise.<string>} the path to the closed container
Closes a resource container archive .