public function overwrite(FileName $aName, FileMimeType $aMimeType)
    {
        $this->name = $aName;
        $this->mimeType = $aMimeType;
        $this->updatedOn = new \DateTimeImmutable();

        $this->publish(new FileOverwritten($this->id()));
    }
public function overwrite(FileName $aName, FileMimeType $aMimeType)
    {
        $this->name = $aName;
        $this->mimeType = $aMimeType;
        $this->updatedOn = new \DateTimeImmutable();

        $this->publish(new FileOverwritten($this->id()));
    }
public function overwrite ( FileName $ aName , FileMimeType $ aMimeType ) { $ this -> name = $ aName ; $ this -> mimeType = $ aMimeType ; $ this -> updatedOn = new \ DateTimeImmutable ( ) ; $ this -> publish ( new FileOverwritten ( $ this -> id ( ) ) ) ; }
Overwrites the file.

@param FileName     $aName     The file name
@param FileMimeType $aMimeType The file mime type
Overwrites the file .