original_string: public static function randomdir($where, $prefix = '', $suffix = '') {
          global $CFG;
  
          $dirname    = false;
          $randomname = self::uuidgen($prefix, $suffix, false);
          $newdirname = $where.DIRECTORY_SEPARATOR.$randomname;
          if (mkdir($newdirname)) {
              chmod($newdirname, $CFG->directorypermissions);
              $dirname = $randomname;
          }
          return $dirname;
      }
code: public static function randomdir($where, $prefix = '', $suffix = '') {
          global $CFG;
  
          $dirname    = false;
          $randomname = self::uuidgen($prefix, $suffix, false);
          $newdirname = $where.DIRECTORY_SEPARATOR.$randomname;
          if (mkdir($newdirname)) {
              chmod($newdirname, $CFG->directorypermissions);
              $dirname = $randomname;
          }
          return $dirname;
      }
code_tokens: public static function randomdir ( $ where , $ prefix = '' , $ suffix = '' ) { global $ CFG ; $ dirname = false ; $ randomname = self :: uuidgen ( $ prefix , $ suffix , false ) ; $ newdirname = $ where . DIRECTORY_SEPARATOR . $ randomname ; if ( mkdir ( $ newdirname ) ) { chmod ( $ newdirname , $ CFG -> directorypermissions ) ; $ dirname = $ randomname ; } return $ dirname ; }
docstring: Creates new folder with random name
  @param string $where
  @param string $prefix
  @param string $suffix
  @return mixed - directory short name or false in case of failure
docstring_tokens: Creates new folder with random name