original_string: public function can_convert_storedfile_to(stored_file $file, $to) {
          if ($file->is_directory()) {
              // Directories cannot be converted.
              return false;
          }
  
          if (!$file->get_filesize()) {
              // Empty files cannot be converted.
              return false;
          }
  
          $from = pathinfo($file->get_filename(), PATHINFO_EXTENSION);
          if (!$from) {
              // No file extension could be found. Unable to determine converter.
              return false;
          }
  
          return $this->can_convert_format_to($from, $to);
      }
code: public function can_convert_storedfile_to(stored_file $file, $to) {
          if ($file->is_directory()) {
              // Directories cannot be converted.
              return false;
          }
  
          if (!$file->get_filesize()) {
              // Empty files cannot be converted.
              return false;
          }
  
          $from = pathinfo($file->get_filename(), PATHINFO_EXTENSION);
          if (!$from) {
              // No file extension could be found. Unable to determine converter.
              return false;
          }
  
          return $this->can_convert_format_to($from, $to);
      }
code_tokens: public function can_convert_storedfile_to ( stored_file $ file , $ to ) { if ( $ file -> is_directory ( ) ) { // Directories cannot be converted. return false ; } if ( ! $ file -> get_filesize ( ) ) { // Empty files cannot be converted. return false ; } $ from = pathinfo ( $ file -> get_filename ( ) , PATHINFO_EXTENSION ) ; if ( ! $ from ) { // No file extension could be found. Unable to determine converter. return false ; } return $ this -> can_convert_format_to ( $ from , $ to ) ; }
docstring: Check whether document conversion is supported for this file and target format.
  
  @param   stored_file $file The file to convert
  @param   string $to The desired target file format (file extension)
  @return  bool Whether the target type can be converted
docstring_tokens: Check whether document conversion is supported for this file and target format .