public function open($filename, $force = false)
    {
        if (!$this->filesystem->exists($filename) && $force) {
            return $this->filesystem->create($filename);
        }

        return $this->filesystem->open($filename);
    }
public function open($filename, $force = false)
    {
        if (!$this->filesystem->exists($filename) && $force) {
            return $this->filesystem->create($filename);
        }

        return $this->filesystem->open($filename);
    }
public function open ( $ filename , $ force = false ) { if ( ! $ this -> filesystem -> exists ( $ filename ) && $ force ) { return $ this -> filesystem -> create ( $ filename ) ; } return $ this -> filesystem -> open ( $ filename ) ; }
By default opens existing files only, but can be forced to create new ones.

@param string $filename
@param bool   $force

@return File

@throws \Symfony\Component\Filesystem\Exception\FileNotFoundException If the file hasn't be found.

@api
By default opens existing files only but can be forced to create new ones .