@param File $file

@return void
546410
public function mutateFile(File &$file)
    {
        //
        // If the HTML file has a template then we should pass it on to the plates renderer
        //
        if ($template = $file->getData('template')) {
            $templateRelativePath = '_templates'.DIRECTORY_SEPARATOR.$template.'.phtml';
            $templatePath = $this->project->sourceDirectory.DIRECTORY_SEPARATOR.$templateRelativePath;
            if (file_exists($templatePath)) {
                $fileName = $file->getFilename();
                $filePath = $file->getPath();

                $file->setRendered(false);
                $file->setData(['content' => $file->getContent()]);
                $file->setFileInfo(new SplFileInfo($templatePath, '_templates', $templateRelativePath));
                $file->setContent($file->getFileContent());
                $file->setFilename($fileName);
                $file->setPath($filePath);
            }
        }
    }
865768
public function removeFile(\Haven\CoreBundle\Entity\File\File $file)
    {
        $this->files->removeElement($file);
    }
206791
protected function setFileSize($file)
    {
        $this->fileSize = ! is_null($this->elfinderFilePath) ? $this->getFileSize() : (is_string($file) ? $this->size($file) : $file->getClientSize());
    }
1240395
public function copy($file)
    {
        $fs = new Filesystem;

        if (! $fs->exists(dirname($file))) {
            $fs->mkdir(dirname($file), 0755);
        }

        $fs->copy($this->source, $file, true);
    }
341020
function setTemplateFile($file){
		$this->_template->setTemplateFile(ROOT . DS . 'application' . DS . 'views' . DS . $file);
		
	}
1351261
public function addFile($file) {
        $baseName = basename($file, '.php');

        $components = explode('.', $baseName);
        $language = $components[1];

        $data = require($file);

        $this->add($data, $language);
    }
499078
public function import($file)
    {
        $data = $this->yaml->load($file);
        parent::import($data);
    }
1136609
public function renderFile(File &$file)
    {
        if ($file->isRendered()) {
            return;
        }
        $fileRenderer = $this->get($file->getExt());
        $file->setContent($fileRenderer->render($file));
        $file->setExt($fileRenderer->getDestinationExtension($file->getExt()));
        $file->setRendered(true);
        $fileRenderer->mutateFile($file);
    }
332490
public function read($file)
    {
        $this->filePath = $file;
        $this->config = parse_ini_file($this->filePath);
    }
873288
private function validate(FileSystem\File $file)
    {
        $filters = $this->buildFilters();
        foreach ($filters as $filter) {
            if (! $filter->validate($file)) return false;
        }

        return true;
    }
1352773
public function write($file)
    {
        if (file_exists($file) && !is_writable($file)) {
            throw new RuntimeException("$file is not writable");
        }
        $fp = fopen($file, 'w');
        foreach ($this->lines as $line) {
            fwrite($fp, $line['data']);
        }
        fclose($fp);
    }
621089
protected function setThumbPaths($file)
    {
        $this->file      = $this->getOnlyFileName($file);
        $this->thumbPath = $this->createThumbDirectory($file);
    }
1152358
protected function createLogsFile($file)
    {
        $directory = dirname($file);

        // Create directory
        if (!$this->files->isDirectory($directory)) {
            $this->files->createDir($directory);
        }

        // Create file
        if (!$this->files->has($file)) {
            $this->files->put($file, '');
        }
    }
1146263
public function write($content) : void
    {
        $this->checkFile();
        $this->checkDir();

        file_put_contents($this->path, $content);
    }
418179
public function load($file) {
		$this->file = $file;

		$msg = array();
		@include($file);

		$this->msg = $msg;
	}
1291223
public function save($file = NULL)
    {
        if(is_null($file) && $this->storage)
        {
            $this->storage->save($this);
        }
        elseif(!is_null($file))
        {
            $this->savePicture($file);
        }
        else
        {
            trigger_error('Image file to save is not defined', E_USER_WARNING);
        }
    }
1224678
public function loadConfig($file)
    {
        $options = [];
        try {
            $loader = new PhpConfig();
            $options = $loader->read($file);
        } catch (\Exception $e) {
            Log::warning($e->getMessage());
        }
		$this->config('options', $options);
	}