original_string: public function makeDirectory( $mode = NULL )
      {
          $mode = $mode ? $mode : 0777;
  
          if ( file_exists($this->path) ){
              if ( is_file($this->path) ){
                  throw new MakeDirectoryException($this);
              }
              return;
          }
  
          $parent_dir = $this->getParent();
  
          if ( !$parent_dir->exists() ){
              $parent_dir->makeDirectory( $mode );
          }
  
          $res = @mkdir( $this->path, $mode );
          if ( $res === FALSE ){
              throw new MakeDirectoryException($this);
          }
      }
code: public function makeDirectory( $mode = NULL )
      {
          $mode = $mode ? $mode : 0777;
  
          if ( file_exists($this->path) ){
              if ( is_file($this->path) ){
                  throw new MakeDirectoryException($this);
              }
              return;
          }
  
          $parent_dir = $this->getParent();
  
          if ( !$parent_dir->exists() ){
              $parent_dir->makeDirectory( $mode );
          }
  
          $res = @mkdir( $this->path, $mode );
          if ( $res === FALSE ){
              throw new MakeDirectoryException($this);
          }
      }
code_tokens: public function makeDirectory ( $ mode = NULL ) { $ mode = $ mode ? $ mode : 0777 ; if ( file_exists ( $ this -> path ) ) { if ( is_file ( $ this -> path ) ) { throw new MakeDirectoryException ( $ this ) ; } return ; } $ parent_dir = $ this -> getParent ( ) ; if ( ! $ parent_dir -> exists ( ) ) { $ parent_dir -> makeDirectory ( $ mode ) ; } $ res = @ mkdir ( $ this -> path , $ mode ) ; if ( $ res === FALSE ) { throw new MakeDirectoryException ( $ this ) ; } }
docstring: Create empty directory
  
  @param string $mode                  File mode.If this parameter is set NULL, 0777 will be applied.
  
  @return void
  
  @throws MakeDirectoryException
docstring_tokens: Create empty directory