Save provided $content string into $destination file

@param string $content Content to save
@param \PhingFile $destination Location where $content is saved

@return void
762232
protected function saveToFile(string $content, PhingFile $destination): void
    {
        $path = $destination->getPath();
        $this->log("Writing: $path", Project::MSG_INFO);

        (new FileWriter($destination))->write($content);
    }
733262
protected function saveContent(string $hash, string $content): void
    {
        $this->adapter->save($this->namespace, $hash, $content);
        $this->cache[$hash] = $content;
    }
529440
private function write($content)
    {
        $handle = fopen($this->_config, 'w+');
        fwrite($handle, @json_encode($content));
        fclose($handle);
    }
725402
public function appendToFile($filename, $content)
    {
        $dir = dirname($filename);

        if (!is_dir($dir)) {
            $this->mkdir($dir);
        }

        if (!is_writable($dir)) {
            throw new IOException(sprintf('Unable to write to the "%s" directory.', $dir), 0, null, $dir);
        }

        if (false === @file_put_contents($filename, $content, FILE_APPEND)) {
            throw new IOException(sprintf('Failed to write file "%s".', $filename), 0, null, $filename);
        }
    }
73433
private function writeToFile($file, $content, $origin = 'n/a')
    {
        return file_put_contents($file, $this->getFileSignature($origin) . $content);
    }
1184707
private function writeToFiles(
        array $content,
        string $baseDir,
        ConfigCache $dump,
        SymfonyBuilder $container
    ): void {
        $rootCode = array_pop($content);
        assert(is_string($rootCode));

        $filesystem = new Filesystem();

        foreach ($content as $file => $code) {
            $filesystem->dumpFile($baseDir . $file, $code);
        }

        $dump->write($rootCode, $container->getResources());
    }
1349102
public static void saveFile(String path, String content) throws IOException {
        saveFile(path, content, false);
    }
311961
public function saveContent($key, $content)
    {
        $this->master->getFilesystem()->write($key, $content, true);

        foreach ($this->slaves as $slave) {
            $slave->getFilesystem()->write($key, $content, true);
        }
    }
715608
public function appendToFile($file, $content)
    {
        if (! file_exists($file)) {
            throw new \Exception('File is missing');
        }
        file_put_contents($file, $content, FILE_APPEND);
    }
641684
public function AttachContent($item, Content $content)
    {
        $item->SetContent($content);
        $item->Save();
        $content->SetLayoutContent($item);
        $content->Save();
    }
165509
public function saveContent($source, $content) {
    $dest = "{$this->path}/content/{$content['id']}";

    // Remove any old content
    \H5PCore::deleteFileTree($dest);

    self::copyFileTree($source, $dest);
  }
123422
public function write($path, $content, $extension = 'html', $filename = 'index')
    {
        $directory = sprintf('%s/%s', $this->destination, trim($path, '/'));
        $file      = sprintf('%s.%s', $filename, $extension);

        if (!$this->files->exists($directory)) {
            $this->files->mkdir($directory);
        }

        $this->files->dumpFile(sprintf('%s/%s', $directory, $file), $content);
    }
423236
public function createFile($content, $node)
	{
		if(!file_exists(dirname($this->config['dir']['site'] . '/' . $node->getUrl())))
    	mkdir(dirname($this->config['dir']['site'] . '/' . $node->getUrl()), 0777, true);

    file_put_contents($this->config['dir']['site'] . '/' . $node->getUrl(), $content);
	}
18735
protected function makeDestination(string $destination): void
    {
        if (! $this->files->isDirectory($destination)) {
            $this->files->makeDirectory($destination, 0777, true);
        }
    }
561941
public static void saveFile(File file, String content) throws IOException {
        saveFile(file, content, false);
    }
892376
public function save($destination = null, $newName = null)
    {
        $fileName = $this->_prepareDestination($destination, $newName);
        $pathInfo = pathinfo($fileName);
        if (!key_exists('extension', $pathInfo) || !in_array($pathInfo['extension'], $this->settings->getExtraFiletypes())) {
            parent::save($destination, $newName);
        }
    }
162568
public function save($content, $fileName) {
        $this->renderer = new Png();
        $this->renderer->setHeight($this->width);
        $this->renderer->setWidth($this->height);
        $writer = new Writer($this->renderer);

        $writer->writeFile($content, $fileName);

        return true;
    }