Common\Doctrine\ValueObject\AbstractFile::writeFileToDisk PHP Method

writeFileToDisk() protected method

if there is an error when moving the file, an exception will be automatically thrown by move(). This will properly prevent the entity from being persisted to the database on error
protected writeFileToDisk ( )
    protected function writeFileToDisk()
    {
        $this->getFile()->move($this->getUploadRootDir(), $this->fileName);
    }