original_string: public static function get_unused_filename($itemid, $filepath, $filename) {
          global $USER;
          $contextid = context_user::instance($USER->id)->id;
          $fs = get_file_storage();
          return $fs->get_unused_filename($contextid, 'user', 'draft', $itemid, $filepath, $filename);
      }
code: public static function get_unused_filename($itemid, $filepath, $filename) {
          global $USER;
          $contextid = context_user::instance($USER->id)->id;
          $fs = get_file_storage();
          return $fs->get_unused_filename($contextid, 'user', 'draft', $itemid, $filepath, $filename);
      }
code_tokens: public static function get_unused_filename ( $ itemid , $ filepath , $ filename ) { global $ USER ; $ contextid = context_user :: instance ( $ USER -> id ) -> id ; $ fs = get_file_storage ( ) ; return $ fs -> get_unused_filename ( $ contextid , 'user' , 'draft' , $ itemid , $ filepath , $ filename ) ; }
docstring: Get an unused filename from the current draft area.
  
  Will check if the file ends with ([0-9]) and increase the number.
  
  @static
  @param int $itemid draft item ID.
  @param string $filepath path to the file.
  @param string $filename name of the file.
  @return string an unused file name.
docstring_tokens: Get an unused filename from the current draft area .