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);
                let archive = directory + '.' + rc.tools.spec.file_ext;
                return rc.open(archive, 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);
                let archive = directory + '.' + rc.tools.spec.file_ext;
                return rc.open(archive, 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 ) ; let archive = directory + '.' + rc . tools . spec . file_ext ; return rc . open ( archive , directory , opts ) ; } ) ; }
Opens a resource container archive so it's contents can be read.
The index will be referenced to validate the resource and retrieve the container type.

@param languageSlug {string}
@param projectSlug {string}
@param resourceSlug {string}
@returns {Promise.<Container>}
Opens a resource container archive so it s contents can be read . The index will be referenced to validate the resource and retrieve the container type .