nl_tokens: Closes ( archives ) a resource container .
pl_tokens: function closeContainer ( container_directory , opts ) { opts = opts || { compression_method : 'tar' , clean : true } ; if ( ! fileUtils . fileExists ( container_directory ) ) return Promise . reject ( new <mask> ( 'Missing resource container' ) ) ; var container_archive = container_directory + '.' + spec . file_ext ; var compressPromise = Promise . resolve ( container_archive ) ; // create archive if it's missing if ( ! fileUtils . fileExists ( container_archive ) ) { if ( opts . compression_method === 'zip' ) { compressPromise = compressionUtils . zip ( container_directory , container_archive ) ; } else { compressPromise = compressionUtils . tar ( container_directory , container_archive ) ; } } return compressPromise . then ( function ( path ) { // remove directory if ( opts . clean ) rimraf . sync ( container_directory ) ; return Promise . resolve ( path ) ; } ) ; }