original_string: public function afterSave()
      {
          if ($this->file instanceof UploadedFile !== true) {
              return;
          }
  
          $path = $this->getUploadedFilePath($this->attribute);
  
          FileHelper::createDirectory(pathinfo($path, PATHINFO_DIRNAME), 0775, true);
  
          if (!$this->file->saveAs($path)) {
              throw new FileUploadException($this->file->error, 'File saving error.');
          }
  
          $this->owner->trigger(static::EVENT_AFTER_FILE_SAVE);
      }
code: public function afterSave()
      {
          if ($this->file instanceof UploadedFile !== true) {
              return;
          }
  
          $path = $this->getUploadedFilePath($this->attribute);
  
          FileHelper::createDirectory(pathinfo($path, PATHINFO_DIRNAME), 0775, true);
  
          if (!$this->file->saveAs($path)) {
              throw new FileUploadException($this->file->error, 'File saving error.');
          }
  
          $this->owner->trigger(static::EVENT_AFTER_FILE_SAVE);
      }
code_tokens: public function afterSave ( ) { if ( $ this -> file instanceof UploadedFile !== true ) { return ; } $ path = $ this -> getUploadedFilePath ( $ this -> attribute ) ; FileHelper :: createDirectory ( pathinfo ( $ path , PATHINFO_DIRNAME ) , 0775 , true ) ; if ( ! $ this -> file -> saveAs ( $ path ) ) { throw new FileUploadException ( $ this -> file -> error , 'File saving error.' ) ; } $ this -> owner -> trigger ( static :: EVENT_AFTER_FILE_SAVE ) ; }
docstring: After save event.
docstring_tokens: After save event .