/** * Load the file content, or default content if file is not found. * * @return string The file content. */ public function getContent() { include_once(ISC_BASE_PATH.'/lib/class.file.php'); $fc = new FileClass(); $filePath = $this->filePath; $content = $fc->readFromFile($filePath); if ($content === false) { // Init new file with default content. $content = $this->defaultContent; $res = $fc->writeToFile($content, $filePath); } return $content; }