original_string: public function mkdir(string $directory, int $mode = null): bool {
      if (!empty($directory)) {
        if ($folders = explode(DIRECTORY_SEPARATOR, Path::replaceOSSeparator($directory))) {
          $fullpath = null;
          if (empty($mode)) {
            $mode = AccessMode::MOD_0777;
          }
          foreach ($folders as $folder) {
            if (!empty($folder)) {
              $fullpath .= DIRECTORY_SEPARATOR . $folder;
              $this->createDirectory($fullpath, $mode);
            }
          }
        }
      }
      return file_exists($directory);
    }
code: public function mkdir(string $directory, int $mode = null): bool {
      if (!empty($directory)) {
        if ($folders = explode(DIRECTORY_SEPARATOR, Path::replaceOSSeparator($directory))) {
          $fullpath = null;
          if (empty($mode)) {
            $mode = AccessMode::MOD_0777;
          }
          foreach ($folders as $folder) {
            if (!empty($folder)) {
              $fullpath .= DIRECTORY_SEPARATOR . $folder;
              $this->createDirectory($fullpath, $mode);
            }
          }
        }
      }
      return file_exists($directory);
    }
code_tokens: public function mkdir ( string $ directory , int $ mode = null ) : bool { if ( ! empty ( $ directory ) ) { if ( $ folders = explode ( DIRECTORY_SEPARATOR , Path :: replaceOSSeparator ( $ directory ) ) ) { $ fullpath = null ; if ( empty ( $ mode ) ) { $ mode = AccessMode :: MOD_0777 ; } foreach ( $ folders as $ folder ) { if ( ! empty ( $ folder ) ) { $ fullpath .= DIRECTORY_SEPARATOR . $ folder ; $ this -> createDirectory ( $ fullpath , $ mode ) ; } } } } return file_exists ( $ directory ) ; }
docstring: - Make directory and sub directory
  @param string $directory Path of directory
  @param int $mode Define chmod of path directory
  @return bool Info if create the folder
docstring_tokens: - Make directory and sub directory