lib/main.js
function openContainer(container_archive, container_directory, opts) {
    opts = opts || { compression_method : 'tar' };
    if(fileUtils.fileExists(container_directory)) {
        return loadContainer(container_directory);
    }
    if(!fileUtils.fileExists(container_archive)) return Promise.reject(new Error('Missing resource container'));
    if(opts.compression_method === 'zip') {
        return compressionUtils.unzip(container_archive, container_directory)
            .then(function(dir) {
                return loadContainer(dir);
            });
    } else {
        return compressionUtils.untar(container_archive, container_directory)
            .then(function(dir) {
                return loadContainer(dir);
            });
    }
}
function openContainer(container_archive, container_directory, opts) {
    opts = opts || { compression_method : 'tar' };
    if(fileUtils.fileExists(container_directory)) {
        return loadContainer(container_directory);
    }
    if(!fileUtils.fileExists(container_archive)) return Promise.reject(new Error('Missing resource container'));
    if(opts.compression_method === 'zip') {
        return compressionUtils.unzip(container_archive, container_directory)
            .then(function(dir) {
                return loadContainer(dir);
            });
    } else {
        return compressionUtils.untar(container_archive, container_directory)
            .then(function(dir) {
                return loadContainer(dir);
            });
    }
}
Opens an archived resource container.
If the container is already opened it will be loaded

@param container_archive {string}
@param container_directory {string}
@param opts {{}} extra options such as compression_method (zip or tar)
@returns {Promise<Container>}