Create a AR archive.
189609
def create_ar (archive, compression, cmd, verbosity, interactive, filenames):
    """"""
    opts = 'rc'
    if verbosity > 1:
        opts += 'v'
    cmdlist = [cmd, opts, archive]
    cmdlist.extend(filenames)
    return cmdlist
663184
def create_flac (archive, compression, cmd, verbosity, interactive, filenames):
    """"""
    cmdlist = [cmd, filenames[0], '--best', '--output-name', archive]
    return cmdlist
101295
def log(ctx, archive_name):
    '''
    
    '''

    _generate_api(ctx)
    ctx.obj.api.get_archive(archive_name).log()
1109339
private File createArchive() throws Exception {
        getLog().info("Creating archive.");
        Artifact artifact = mavenProject.getArtifact();
        String clsfr = noclassifier ? "" : ("-" + classifier);
        String archiveName = artifact.getArtifactId() + "-" + artifact.getVersion() + clsfr + ".jar";
        File jarFile = new File(mavenProject.getBuild().getDirectory(), archiveName);
        MavenArchiver archiver = new MavenArchiver();
        jarArchiver.addDirectory(stagingDirectory);
        archiver.setArchiver(jarArchiver);
        archiver.setOutputFile(jarFile);
        archiver.createArchive(mavenSession, mavenProject, archiveConfig);
        
        if (noclassifier) {
            artifact.setFile(jarFile);
        } else {
            projectHelper.attachArtifact(mavenProject, jarFile, classifier);
        }
        
        FileUtils.deleteDirectory(stagingDirectory);
        return jarFile;
    }
184712
def list_arj (archive, compression, cmd, verbosity, interactive):
    """"""
    cmdlist = [cmd]
    if verbosity > 1:
        cmdlist.append('v')
    else:
        cmdlist.append('l')
    if not interactive:
        cmdlist.append('-y')
    cmdlist.extend(['-r', archive])
    return cmdlist
1236194
def archive(cls):
    """"""
    req = datastore.BeginTransactionRequest()
    resp = datastore.begin_transaction(req)
    tx = resp.transaction
    req = datastore.RunQueryRequest()
    req.read_options.transaction = tx
    q = req.query
    set_kind(q, kind='Todo')
    add_projection(q, '__key__')
    set_composite_filter(q.filter,
                         datastore.CompositeFilter.AND,
                         set_property_filter(
                             datastore.Filter(),
                             'done', datastore.PropertyFilter.EQUAL, True),
                         set_property_filter(
                             datastore.Filter(),
                             '__key__', datastore.PropertyFilter.HAS_ANCESTOR,
                             default_todo_list.key))
    resp = datastore.run_query(req)
    req = datastore.CommitRequest()
    req.transaction = tx
    for result in resp.batch.entity_results:
      req.mutations.add().delete.CopyFrom(result.entity.key)
    resp = datastore.commit(req)
    return ''
514653
def open(self):
        '''
        
        '''
        if self.__arch is not None:
            raise salt.exceptions.SaltException('Archive already opened.')
        self.__arch = tarfile.TarFile.bz2open(self.archive_path, 'w')
1189945
def load_archive(self, args):
        
        import warnings
        warnings.warn("`Task.load_archive()` is deprecated!  "
                      "`Catalog.load_url` handles the same functionality.")
        return self.archived or args.archived
1010935
def do_use(self, args):
        """"""
        self.instance = args
        self.prompt = self.instance + '> '

        archive = self._client.get_archive(self.instance)
        self.streams = [s.name for s in archive.list_streams()]
        self.tables = [t.name for t in archive.list_tables()]
389750
def load_and_parse(self):
        """"""

        archives = []
        to_return = {}

        for name, project in self.all_projects.items():
            archives = archives + self.parse_archives_from_project(project)

        # We're going to have a similar issue with parsed nodes, if we want to
        # make parse_node return those.
        for a in archives:
            # archives have a config, but that would make for an invalid
            # UnparsedNode, so remove it and pass it along to parse_node as an
            # argument.
            archive_config = a.pop('config')
            archive = UnparsedNode(**a)
            node_path = self.get_path(archive.resource_type,
                                      archive.package_name,
                                      archive.name)

            to_return[node_path] = self.parse_node(
                archive,
                node_path,
                self.all_projects.get(archive.package_name),
                archive_config=archive_config)

        return to_return
1018316
def (self):
        """"""

        archive_data = {"packets": self.recv_msgs,
                        "dataset": self.dataset_name,
                        "num_packets": len(self.recv_msgs),
                        "created": rnow()}
        self.write_to_file(archive_data,
                           self.archive_file)
696270
def groups_archive(self, room_id, **kwargs):
        """"""
        return self.__call_api_post('groups.archive', roomId=room_id, kwargs=kwargs)
1215486
def create_archive(
            self,
            archive_name,
            authority_name,
            archive_path,
            versioned,
            raise_on_err=True,
            metadata=None,
            user_config=None,
            tags=None,
            helper=False):
        '''
        

        '''

        archive_metadata = self._create_archive_metadata(
            archive_name=archive_name,
            authority_name=authority_name,
            archive_path=archive_path,
            versioned=versioned,
            raise_on_err=raise_on_err,
            metadata=metadata,
            user_config=user_config,
            tags=tags,
            helper=helper)

        if raise_on_err:
            self._create_archive(
                archive_name,
                archive_metadata)
        else:
            self._create_if_not_exists(
                archive_name,
                archive_metadata)

        return self.get_archive(archive_name)
179235
def create_tar (archive, compression, cmd, verbosity, interactive, filenames):
    """"""
    cmdlist = [cmd, '-c']
    add_star_opts(cmdlist, compression, verbosity)
    cmdlist.append("file=%s" % archive)
    cmdlist.extend(filenames)
    return cmdlist
794995
def _create(archive, compression, cmd, format, verbosity, filenames):
    """"""
    if len(filenames) > 1:
        raise util.PatoolError('multi-file compression not supported in Python lzma')
    try:
        with lzma.LZMAFile(archive, mode='wb', **_get_lzma_options(format, preset=9)) as lzmafile:
            filename = filenames[0]
            with open(filename, 'rb') as srcfile:
                data = srcfile.read(READ_SIZE_BYTES)
                while data:
                    lzmafile.write(data)
                    data = srcfile.read(READ_SIZE_BYTES)
    except Exception as err:
        msg = "error creating %s: %s" % (archive, err)
        raise util.PatoolError(msg)
    return None
1215160
protected void assembleArchive() throws Exception {
        getLog().info("Assembling " + classifier + " archive");
        
        if (resources != null && !resources.isEmpty()) {
            getLog().info("Copying additional resources.");
            new ResourceProcessor(this, moduleBase, resources).transform();
        }
        
        if (configTemplate != null) {
            getLog().info("Creating config file.");
            configTemplate.addEntry("info", pluginDescriptor.getName(), pluginDescriptor.getVersion(),
                new Date().toString());
            configTemplate.createFile(stagingDirectory);
        }
        
        try {
            File archive = createArchive();
            
            if ("war".equalsIgnoreCase(mavenProject.getPackaging()) && this.warInclusion) {
                webappLibDirectory.mkdirs();
                File webappLibArchive = new File(this.webappLibDirectory, archive.getName());
                Files.copy(archive, webappLibArchive);
            }
        } catch (Exception e) {
            throw new RuntimeException("Exception occurred assembling archive.", e);
        }
        
    }
192764
async def serialize_archive(self, ar, version=None):
        
        # Transaction prefix serialization first.
        await ar.message(self, TransactionPrefix)

        if self.version == 1:
            await ar.tag('signatures')
            await ar.begin_array()
            await ar.prepare_container(len(self.vin), eref(self, 'signatures'), elem_type=SignatureArray)
            signatures_not_expected = len(self.signatures) == 0
            if not signatures_not_expected and len(self.vin) != len(self.signatures):
                raise ValueError('Signature size mismatch')

            for i in range(len(self.vin)):
                sig_size = get_signature_size(self.vin[i])
                if signatures_not_expected:
                    if 0 == sig_size:
                        continue
                    else:
                        raise ValueError('Unexpected sig')

                await ar.prepare_container(sig_size, eref(self.signatures, i), elem_type=SignatureArray)
                if sig_size != len(self.signatures[i]):
                    raise ValueError('Unexpected sig size')

                for j in range(sig_size):
                    await ar.field(eref(self.signatures[i], j), Signature)

        else:
            await ar.tag('rct_signatures')
            if len(self.vin) == 0:
                return

            await ar.begin_object()
            await ar.prepare_message(eref(self, 'rct_signatures'), RctSig)
            await self.rct_signatures.serialize_rctsig_base(ar, len(self.vin), len(self.vout))
            await ar.end_object()

            if self.rct_signatures.type != RctType.Null:
                mixin_size = len(self.vin[0].key_offsets) - 1 if len(self.vin) > 0 and isinstance(self.vin[0], TxinToKey) else 0
                await ar.tag('rctsig_prunable')
                await ar.begin_object()
                await ar.prepare_message(eref(self.rct_signatures, 'p'), RctSigPrunable)
                await self.rct_signatures.p.serialize_rctsig_prunable(ar, self.rct_signatures.type,
                                                                      len(self.vin), len(self.vout),
                                                                      mixin_size)
                await ar.end_object()
        return self