original_string: public function setDirPaths($dir_path)
      {
          if (is_null($dir_path)) {
              $this->setDir($this->getUploadPath());
              $this->setDirPath("");
          } else {
              $this->setDirPath($this->DirTrim($dir_path));
              $this->setDir($this->getUploadPath() . self::DS . $dir_path);
          }
  
          $path_valid = $this->checkPath($this->getDir());
          if (!$path_valid) {
              $this->setDir($this->getUploadPath());
          }
      }
code: public function setDirPaths($dir_path)
      {
          if (is_null($dir_path)) {
              $this->setDir($this->getUploadPath());
              $this->setDirPath("");
          } else {
              $this->setDirPath($this->DirTrim($dir_path));
              $this->setDir($this->getUploadPath() . self::DS . $dir_path);
          }
  
          $path_valid = $this->checkPath($this->getDir());
          if (!$path_valid) {
              $this->setDir($this->getUploadPath());
          }
      }
code_tokens: public function setDirPaths ( $ dir_path ) { if ( is_null ( $ dir_path ) ) { $ this -> setDir ( $ this -> getUploadPath ( ) ) ; $ this -> setDirPath ( "" ) ; } else { $ this -> setDirPath ( $ this -> DirTrim ( $ dir_path ) ) ; $ this -> setDir ( $ this -> getUploadPath ( ) . self :: DS . $ dir_path ) ; } $ path_valid = $ this -> checkPath ( $ this -> getDir ( ) ) ; if ( ! $ path_valid ) { $ this -> setDir ( $ this -> getUploadPath ( ) ) ; } }
docstring: Set the dir paths
  
  @param null|string $dir_path
docstring_tokens: Set the dir paths