Writes deployment file.
972586
public function write()
    {
        foreach ($this->parameters as $prop => $value) {
            $placeHolders[] = sprintf('<%s>', $prop);
            $replacements[] = $value;
        }

        $config = str_replace($placeHolders, $replacements, self::$configTemplate);
        $config = sprintf('%s%s%s', self::$defaultConfigTemplate, PHP_EOL, $config);

        if (true === $this->parameters['composer']) {
            $config = sprintf('%s%s%s', $config, PHP_EOL, self::$downloadComposerTaskTemplate);
        }

        if (true === $this->parameters['schemadb']) {
            $config = sprintf('%s%s%s', $config, PHP_EOL, self::$updateSchemaTaskTemplate);
        }

        fwrite($this->file, $this->addHeaders($config));
    }
581859
void fileWritten() throws ConfigurationPersistenceException {
        if (!doneBootup.get() || interactionPolicy.isReadOnly()) {
            return;
        }
        try {
            FilePersistenceUtils.copyFile(mainFile, lastFile);
        } catch (IOException e) {
            throw ControllerLogger.ROOT_LOGGER.failedToBackup(e, mainFile);
        }
    }
264221
private void write() throws IOException
   {
      m_projectFile.validateUniqueIDsForMicrosoftProject();

      writeFileCreationRecord();
      writeProjectHeader(m_projectFile.getProjectProperties());

      if (m_projectFile.getResources().isEmpty() == false)
      {
         m_resourceModel = new ResourceModel(m_projectFile, m_locale);
         m_writer.write(m_resourceModel.toString());
         for (Resource resource : m_projectFile.getResources())
         {
            writeResource(resource);
         }
      }

      if (m_projectFile.getTasks().isEmpty() == false)
      {
         m_taskModel = new TaskModel(m_projectFile, m_locale);
         m_writer.write(m_taskModel.toString());
         writeTasks(m_projectFile.getChildTasks());
      }

      m_writer.flush();
   }
799411
private function write()
	{
		$content = '';

		foreach ($this->getFiles() as $file)
		{
			$content .= '$this->call(\'' . str_replace('.php', '', $file) . '\');';	
		}
		
		$databaseSeeder = str_replace('{calls}', $content, $this->getPattern());

		$this->getFilesystem()->put(app_path() . '/database/seeds/DatabaseSeeder.php', $databaseSeeder);
	}
277194
public void writeCoverageResults() {
        File coverageFile = new File(this.testSessionDir,
                ICS_MAP.get(this.requestId));
        if (coverageFile.exists()) {
            return;
        }
        OutputStream fos = null;
        try {
            fos = new FileOutputStream(coverageFile, false);
            writeDocument(fos, this.coverageDoc);
        } catch (FileNotFoundException e) {
        } finally {
            try {
                // Fortify Mod: If fos is null, then nothing was written
                if( fos != null) {
                    fos.close();
                    LOGR.config("Wrote coverage results to "
                        + coverageFile.getCanonicalPath());
                    }
                else {
                    // If nothing was written, then there should be an exception message.  
                    // If an additional message is desired, then add it here.
                    }
            } catch (IOException ioe) {
                LOGR.warning(ioe.getMessage());
            }
        }

    }
338857
public function deployArtifactsGenerate()
    {
        $this->startTimer();

        $this->printStageInfo('GENERATE ASSETS');

        $this->printTaskInfo('SET PRODUCTION MODE');
        $this->taskMagentoSetProductionMode()->run();

        $this->printTaskInfo('MAGENTO SETUP DI COMPILE');
        $this->taskMagentoSetupDiCompile()->run();

        $this->printTaskInfo('COMPOSER DUMP AUTOLOAD');
        $this->taskMagentoDumpAutoload()->run();

        $this->printTaskInfo('MAGENTO SETUP STATIC CONTENT DEPLOY');
        $this->taskMagentoSetupStaticContentDeploy()->run();

        $this->printTaskInfo('GENERATE ARTIFACTS');
        $this->taskArtifactCreatePackages()->run();

        $this->stopTimer();
        $this->printRuntime(__FUNCTION__);
    }
163260
synchronized private void writeConfigFile(final JaspiConfig jaspiConfig) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "writeConfigFile", new Object[] { jaspiConfig });
        if (configFile == null) {
            // TODO handle persistence
            //String msg = MessageFormatHelper.getFormattedMessage(msgBundle, AdminConstants.MSG_JASPI_PERSISTENT_FILE, new Object[] { PersistenceManager.JASPI_CONFIG });
            //throw new RuntimeException(msg);
        }
        PrivilegedExceptionAction<Object> marshalFile = new PrivilegedExceptionAction<Object>() {

            @Override
            public Object run() throws Exception {
                JAXBContext jc = JAXBContext.newInstance(JaspiConfig.class);
                Marshaller writer = jc.createMarshaller();
                writer.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
                writer.marshal(jaspiConfig, configFile);
                return null;
            }
        };
        try {
            AccessController.doPrivileged(marshalFile);
        } catch (PrivilegedActionException e) {
            FFDCFilter.processException(e, this.getClass().getName() + ".writeConfigFile", "290", this);
            throw new RuntimeException("Unable to write " + configFile, e);
        }
        if (tc.isEntryEnabled())
            Tr.exit(tc, "writeConfigFile");
    }
1204116
def deploy():
    

    init_tasks()

    if not has_hook("copy"):
        return report("No copy method has been defined")

    if not env.exists(paths.get_shared_path()):
        return report("You need to run setup before running deploy")

    run_hook("before_deploy")

    release_name = int(time.time()*1000)
    release_path = paths.get_releases_path(release_name)

    env.current_release = release_path

    try:
        run_hook("copy")
    except Exception as e:
        return report("Error occurred on copy. Aborting deploy", err=e)

    if not env.exists(paths.get_source_path(release_name)):
        return report("Source path not found '%s'" %
                      paths.get_source_path(release_name))

    try:
        run_hook("deploy")
    except Exception as e:
        message = "Error occurred on deploy, starting rollback..."

        logger.error(message)
        logger.error(e)

        run_task("rollback")
        return report("Error occurred on deploy")

    # Symlink current folder
    paths.symlink(paths.get_source_path(release_name),
                  paths.get_current_path())

    # Clean older releases
    if "max_releases" in env:
        cleanup_releases(int(env.max_releases))

    run_hook("after_deploy")

    if "public_path" in env:
        paths.symlink(paths.get_source_path(release_name), env.public_path)

    logger.info("Deploy complete")
757619
def write_report(self, force=False):
        '''
        
        '''
        path = self.title + '.html'
        value = self._template.format(
            title=self.title, body=self.body, sidebar=self.sidebar)
        write_file(path, value, force=force)
        plt.ion()
1330676
private function writeConfig()
    {
        if ($this->option('write-config'))
        {
            $configFile = base_path() . '/config/larasearch.php';

            if ($this->getLaravel())
            {
                if ( ! File::exists($configFile))
                {
                    if ($this->confirm('It appears that you have not yet published the larasearch config. Would you like to do this now?', false))
                    {
                        $this->call('vendor:publish', ['--provider' => 'Iverberk\\Larasearch\LarasearchServiceProvider', '--tag' => 'config']);
                    }
                    else
                    {
                        return;
                    }
                }
            }
            else
            {
                if ( ! File::exists($configFile))
                {
                    $this->info('Lumen application detected. Please copy the config manually to config/larasearch.php.');
                }
            }

            File::put(dirname($configFile) . "/paths.json", json_encode(['paths' => $this->paths, 'reversedPaths' => $this->reversedPaths], JSON_PRETTY_PRINT));

            $this->info('Paths file written to local package configuration');
        }
        else
        {
            $this->info(json_encode(['paths' => $this->paths, 'reversedPaths' => $this->reversedPaths], JSON_PRETTY_PRINT));
        }
    }
570061
def output_file(self, _container):
        """"""
        p = local.path(_container)
        if p.exists():
            if not ui.ask("Path '{0}' already exists."
                          " Overwrite?".format(p)):
                sys.exit(0)
        CFG["container"]["output"] = str(p)
48118
def Write(self):
    """"""
    if self.writeback:
      self.writeback.SaveData(self.writeback_data)
    else:
      raise RuntimeError("Attempting to write a configuration without a "
                         "writeback location.")
1208448
private function writeColumns(): void
  {
    $content = '';
    foreach ($this->columns as $table)
    {
      $width1 = 0;
      $width2 = 0;
      foreach ($table as $column)
      {
        $width1 = max(mb_strlen($column['column_name']), $width1);
        $width2 = max(mb_strlen((string)$column['length']), $width2);
      }

      foreach ($table as $column)
      {
        if (isset($column['length']))
        {
          if (isset($column['constant_name']))
          {
            $line_format = sprintf("%%s.%%-%ds %%%dd %%s\n", $width1, $width2);
            $content     .= sprintf($line_format,
                                    $column['table_name'],
                                    $column['column_name'],
                                    $column['length'],
                                    $column['constant_name']);
          }
          else
          {
            $line_format = sprintf("%%s.%%-%ds %%%dd\n", $width1, $width2);
            $content     .= sprintf($line_format,
                                    $column['table_name'],
                                    $column['column_name'],
                                    $column['length']);
          }
        }
      }

      $content .= "\n";
    }

    // Save the columns, width and constants to the filesystem.
    $this->writeTwoPhases($this->constantsFilename, $content);
  }
749749
def write(dest)
      path = destination(dest)
      FileUtils.mkdir_p(File.dirname(path))
      File.write(path, output, :mode => "wb")
      Bunto::Hooks.trigger hook_owner, :post_write, self
    end
386889
def write_config(data, conf_dir=DEFAULT_CONFIG_DIR, codec="yaml",
                 backup_existing=False):
    
    if not codec:
        codec = 'yaml'
    codec = munge.get_codec(codec)()
    conf_dir = os.path.expanduser(conf_dir)
    if not os.path.exists(conf_dir):
        os.mkdir(conf_dir)

    # Check for existing file, back up if necessary
    outpath = os.path.join(conf_dir, 'config.' + codec.extensions[0])
    if backup_existing and os.path.exists(outpath):
        os.rename(outpath, outpath + '.bak')
    codec.dump(data, open(outpath, 'w'))
590370
function deploy($output = null) {
        if(is_null($this->source_dir)) {
            return false;
        }
        if($output) {
            $styled = '<comment>Package "' . $this->package . '"</comment> deployed in <error>"/packages/' . $this->package . '"</error>';
            $output->writeln($styled);
        }
        \File::copyDirectory(base_path('vendor/' . $this->package . '/' . $this->source_dir), public_path('packages/' . $this->package));
        
        return true;
    }
197664
def write(dest)
      path = destination(dest)
      FileUtils.mkdir_p(File.dirname(path))
      File.write(path, output, :mode => "wb")

      trigger_hooks(:post_write)
    end