/** * Adds or updates a generic file if neccessary. * @param string $file_name Original name of header. * @param string $content * @param string $subdir */ public function AddGenericFile($file_name, &$content, $subdir = "") { if ($subdir) { $subdir = trim($subdir, "\\/") . "/"; if (!file_exists($this->output_path . $subdir)) { \Peg\Lib\Utilities\FileSystem::MakeDir($this->output_path . $subdir, 0755, true); } } $output_file = $this->output_path . $subdir . $file_name; \Peg\Lib\Utilities\FileSystem::WriteFileIfDifferent($output_file, $content); }