Box\Spout\Writer\ODS\Helper\FileSystemHelper::copyFileContentsToTarget PHP Method

copyFileContentsToTarget() protected method

Depending on which mode the target resource was created with, it will truncate then copy or append the content to the target file.
protected copyFileContentsToTarget ( string $sourceFilePath, resource $targetResource ) : void
$sourceFilePath string Path of the file whose content will be copied
$targetResource resource Target resource that will receive the content
return void
    protected function copyFileContentsToTarget($sourceFilePath, $targetResource)
    {
        $sourceHandle = fopen($sourceFilePath, 'r');
        stream_copy_to_stream($sourceHandle, $targetResource);
        fclose($sourceHandle);
    }