Export results to .md file inside docs folder.

@param string $filename Name of the file to store information.

@return void
181256
protected function exportMarkup($filename)
    {
        $file = $this->getProject()->getProperty('project.basedir') . "/docs/" . $filename;
        file_put_contents($file, $this->markup);
    }
630633
public function exportToFile(string $filename, string $password = NULL) {
        $status = openssl_pkey_export_to_file(
            $this->getHandle(),
            $filename,
            $password
        );
        if(!$status) {
            throw new RuntimeException(OpenSSL::getLastError());
        }
    }
183357
public function writeToFile($fileName = 'report.xlsx')
    {
        $this->output = fopen($fileName, 'w');
        $finalizer = new Finalizer($this->sheet, $this->styler, $this->sheetFile);
        $finalizer->finalize($this->output);
    }
1125725
public function generate(string $filename): bool
    {
        $this->writeFile(
            $filename,
            $this->generateContents()
        );

        return true;
    }
457510
public function save($filename, $formatOutput = true)
    {
        // Format output
        if ($formatOutput === true) {
            $this->dom->formatOutput = true;
        }

        return $this->dom->save($filename);
    }
311900
public function saveAs($filename) {
    if (!$this->_isCreated && !$this->createPdf()) {
      return FALSE;
    }
    if (!$this->_tmpPdfFile->saveAs($filename)) {
      $this->_error = "Could not save PDF as '$filename'";
      return FALSE;
    }
    return TRUE;
  }
992649
public static function php($data, $fileName) {
        $filePath = Config::getx('path_temp') . $fileName.'.php';
        $result = file_put_contents($filePath, "<?php\nreturn " . var_export($data, true) . ";");
        return $result;
    }
485289
protected function writeCache( $fileName )
	{
		$file		= new FS_File_Writer( $fileName, 0777 );
		$content	= serialize( $this->getConfigValues() );
		$file->writeString( $content );
		touch( $fileName, filemtime( $this->pathConfig.$this->fileName ) );
	}
1171624
public function moveFile($filename) {

        $destinationPath = $this->ImagesHelper->pathOfImagesUploadParentFolder() . "/" . Config::get('lasallecmsfrontend.images_folder_uploaded');

        \Input::file('featured_image_upload')->move($destinationPath, $filename);
    }
54055
public function save($filename)
    {
        $json = [];
        foreach ($this as $cookie) {
            if ($cookie->getExpires() && !$cookie->getDiscard()) {
                $json[] = $cookie->toArray();
            }
        }

        if (false === file_put_contents($filename, json_encode($json))) {
            // @codeCoverageIgnoreStart
            throw new \RuntimeException("Unable to save file {$filename}");
            // @codeCoverageIgnoreEnd
        }
    }
541440
public function export(string $filename)
    {
        $zip = new CNabuZipBuilder();
        $unlink_files = array();

        if ($this->getObjectsCount() > 0) {
            $file = new CNabuXMLBuilder();
            $package = new CNabuXMLPackage($this->nb_customer);
            if ($this->nb_language_list->getSize() > 0) {
                $package->setXMLLanguageList(new CNabuXMLLanguageList($this->nb_language_list));
            }
            if ($this->nb_role_list->getSize() > 0) {
                $package->setXMLRoleList(new CNabuXMLRoleList($this->nb_role_list));
            }
            if ($this->nb_site_list->getSize() > 0) {
                $package->setXMLSiteList(new CNabuXMLSiteList($this->nb_site_list));
            }
            $file->addFragment($package);
            $file->create();
            $zip->addFragment(new CNabuZipStream($zip, 'data', 'package.xml', $file));
        }

        $zip->exportToFile($filename);

        foreach ($unlink_files as $filename) {
            unlink($filename);
        }
    }
761174
public function expandFileProperties($filename) {
    $expanded_contents = Expander::expandArrayProperties(file($filename), $this->export());
    file_put_contents($filename, implode("", $expanded_contents));
  }
1148772
protected function createFullFilePath($fileName)
    {
        $tempPath = $this->documentConfig->getTempPath();

        if (!is_dir($tempPath)) {
            mkdir($tempPath, 777, true);
        }

        return sprintf('%s/%s', $tempPath, $fileName);
    }
1346109
public function getFile($fileName)
    {
        $result = false;

        if (isset($_FILES[$fileName])) {
            $result = $_FILES[$fileName];
        }

        return $result;
    }
991790
public function removeFile($filename)
    {

        if (!$filename) {
            trigger_error(ReporticoLang::templateXlate("UNABLE_TO_REMOVE") . templateXlate("SPECIFYXML"), E_USER_ERROR);
            return false;
        }

        if (!preg_match("/\.xml$/", $filename)) {
            $filename = $filename . ".xml";
        }

        $projdir = $this->query->projects_folder . "/" . ReporticoApp::getConfig("project");
        if (!is_file($projdir)) {
            ReporticoUtility::findFileToInclude($projdir, $projdir);
        }

        if ($projdir && is_dir($projdir)) {
            $fn = $projdir . "/" . $filename;
            if (!is_file($fn)) {
                trigger_error(ReporticoLang::templateXlate("UNABLE_TO_REMOVE") . " $filename  - " . templateXlate("NOFILE"), E_USER_ERROR);
            } else if (!is_writeable($fn)) {
                trigger_error(ReporticoLang::templateXlate("UNABLE_TO_REMOVE") . " $filename  - " . templateXlate("NOWRITE"), E_USER_ERROR);
            } else {
                if (!unlink($fn)) {
                    trigger_error(ReporticoLang::templateXlate("UNABLE_TO_REMOVE") . " $filename  - " . templateXlate("NOWRITE"), E_USER_ERROR);
                } else {
                    ReporticoApp::handleDebug(ReporticoLang::templateXlate("REPORTFILE") . " $filename " . templateXlate("DELETEOKACT"), 0);
                }

            }
        } else {
            trigger_error("Unable to open project area " . ReporticoApp::getConfig("project") . " to save file $filename " .
                $this->query->reports_path . "/" . $filename . " Not Found", E_USER_ERROR);
        }

    }
1022724
public function sendToBrowserInline($filename)
    {
        ReportRenderer::sendToBrowser(
            $filename,
            ReportRenderer::CSV_FORMAT,
            "application/" . ReportRenderer::CSV_FORMAT,
            $this->getRenderedReport()
        );
    }
137234
public function write($filename)
    {
        if ($this->isDirty && $this->bytes) {
            return file_put_contents($filename, $this->bytes);
        }
        if ($this->isDirty && $this->filename) {
            return copy($this->filename, $filename);
        }
        if ($this->mongoGridFSFile instanceof \MongoGridFSFile) {
            return $this->mongoGridFSFile->write($filename);
        }
        throw new \BadMethodCallException('Nothing to write(). File is not persisted yet and is not dirty.');
    }