original_string: public function get_file_info($context = NULL, $component = NULL, $filearea = NULL, $itemid = NULL, $filepath = NULL, $filename = NULL) {
          if (!$context) {
              $context = context_system::instance();
          }
          switch ($context->contextlevel) {
              case CONTEXT_SYSTEM:
                  return $this->get_file_info_context_system($context, $component, $filearea, $itemid, $filepath, $filename);
              case CONTEXT_USER:
                  return $this->get_file_info_context_user($context, $component, $filearea, $itemid, $filepath, $filename);
              case CONTEXT_COURSECAT:
                  return $this->get_file_info_context_coursecat($context, $component, $filearea, $itemid, $filepath, $filename);
              case CONTEXT_COURSE:
                  return $this->get_file_info_context_course($context, $component, $filearea, $itemid, $filepath, $filename);
              case CONTEXT_MODULE:
                  return $this->get_file_info_context_module($context, $component, $filearea, $itemid, $filepath, $filename);
          }
  
          return null;
      }
code: public function get_file_info($context = NULL, $component = NULL, $filearea = NULL, $itemid = NULL, $filepath = NULL, $filename = NULL) {
          if (!$context) {
              $context = context_system::instance();
          }
          switch ($context->contextlevel) {
              case CONTEXT_SYSTEM:
                  return $this->get_file_info_context_system($context, $component, $filearea, $itemid, $filepath, $filename);
              case CONTEXT_USER:
                  return $this->get_file_info_context_user($context, $component, $filearea, $itemid, $filepath, $filename);
              case CONTEXT_COURSECAT:
                  return $this->get_file_info_context_coursecat($context, $component, $filearea, $itemid, $filepath, $filename);
              case CONTEXT_COURSE:
                  return $this->get_file_info_context_course($context, $component, $filearea, $itemid, $filepath, $filename);
              case CONTEXT_MODULE:
                  return $this->get_file_info_context_module($context, $component, $filearea, $itemid, $filepath, $filename);
          }
  
          return null;
      }
code_tokens: public function get_file_info ( $ context = NULL , $ component = NULL , $ filearea = NULL , $ itemid = NULL , $ filepath = NULL , $ filename = NULL ) { if ( ! $ context ) { $ context = context_system :: instance ( ) ; } switch ( $ context -> contextlevel ) { case CONTEXT_SYSTEM : return $ this -> get_file_info_context_system ( $ context , $ component , $ filearea , $ itemid , $ filepath , $ filename ) ; case CONTEXT_USER : return $ this -> get_file_info_context_user ( $ context , $ component , $ filearea , $ itemid , $ filepath , $ filename ) ; case CONTEXT_COURSECAT : return $ this -> get_file_info_context_coursecat ( $ context , $ component , $ filearea , $ itemid , $ filepath , $ filename ) ; case CONTEXT_COURSE : return $ this -> get_file_info_context_course ( $ context , $ component , $ filearea , $ itemid , $ filepath , $ filename ) ; case CONTEXT_MODULE : return $ this -> get_file_info_context_module ( $ context , $ component , $ filearea , $ itemid , $ filepath , $ filename ) ; } return null ; }
docstring: Looks up file_info instance
  
  @param stdClass $context context object
  @param string $component component
  @param string $filearea file area
  @param int $itemid item ID
  @param string $filepath file path
  @param string $filename file name
  @return file_info|null file_info instance or null if not found or access not allowed
docstring_tokens: Looks up file_info instance