original_string: public function prepare(File $file, $entity, $field, $noclobber = true, $forceFilename = '')
      {
          $dir = $this->getDir($entity, $field);
          if ($forceFilename) {
              $pathname = $dir . '/' . $forceFilename;
          } else {
              if ($file instanceof UploadedFile) {
                  $fileName = $file->getClientOriginalName();
              } else {
                  $fileName = $file->getBasename();
              }
  
              $i = 0;
              do {
                  $f = $this->namingStrategy->normalize($fileName, $i++);
                  $pathname = $dir . '/' . $f;
              } while ($noclobber && $this->fs->exists($pathname));
              $this->fs->mkdir(dirname($pathname), 0777 & ~umask(), true);
              $this->fs->touch($pathname);
          }
          $this->preparedPaths[]= $pathname;
          return $pathname;
      }
code: public function prepare(File $file, $entity, $field, $noclobber = true, $forceFilename = '')
      {
          $dir = $this->getDir($entity, $field);
          if ($forceFilename) {
              $pathname = $dir . '/' . $forceFilename;
          } else {
              if ($file instanceof UploadedFile) {
                  $fileName = $file->getClientOriginalName();
              } else {
                  $fileName = $file->getBasename();
              }
  
              $i = 0;
              do {
                  $f = $this->namingStrategy->normalize($fileName, $i++);
                  $pathname = $dir . '/' . $f;
              } while ($noclobber && $this->fs->exists($pathname));
              $this->fs->mkdir(dirname($pathname), 0777 & ~umask(), true);
              $this->fs->touch($pathname);
          }
          $this->preparedPaths[]= $pathname;
          return $pathname;
      }
code_tokens: public function prepare ( File $ file , $ entity , $ field , $ noclobber = true , $ forceFilename = '' ) { $ dir = $ this -> getDir ( $ entity , $ field ) ; if ( $ forceFilename ) { $ pathname = $ dir . '/' . $ forceFilename ; } else { if ( $ file instanceof UploadedFile ) { $ fileName = $ file -> getClientOriginalName ( ) ; } else { $ fileName = $ file -> getBasename ( ) ; } $ i = 0 ; do { $ f = $ this -> namingStrategy -> normalize ( $ fileName , $ i ++ ) ; $ pathname = $ dir . '/' . $ f ; } while ( $ noclobber && $ this -> fs -> exists ( $ pathname ) ) ; $ this -> fs -> mkdir ( dirname ( $ pathname ) , 0777 & ~ umask ( ) , true ) ; $ this -> fs -> touch ( $ pathname ) ; } $ this -> preparedPaths [ ] = $ pathname ; return $ pathname ; }
docstring: Prepares a file for upload, which means that a stub file is created at the point where the file
  otherwise would be uploaded.
  
  @param File $file
  @param mixed $entity
  @param string $field
  @param bool $noclobber
  @param string $forceFilename
  @return string
docstring_tokens: Prepares a file for upload which means that a stub file is created at the point where the file otherwise would be uploaded .