public function save(File $file, $filename = null)
    {
        if ($filename !== null) {
            $file->setFilename($filename);
        }

        $this->filesystem->write($file);
    }
public function save(File $file, $filename = null)
    {
        if ($filename !== null) {
            $file->setFilename($filename);
        }

        $this->filesystem->write($file);
    }
public function save ( File $ file , $ filename = null ) { if ( $ filename !== null ) { $ file -> setFilename ( $ filename ) ; } $ this -> filesystem -> write ( $ file ) ; }
File changes are made in memory only, until this methods actually applies
them on the filesystem.

@param File $file

@throws \Symfony\Component\Filesystem\Exception\IOException If the file cannot be written to.

@api
File changes are made in memory only until this methods actually applies them on the filesystem .