MimeTypeGuesser::guess

public function MimeTypeGuesser::guess

public MimeTypeGuesser::guess($path)

Guesses the mime type of the file with the given path.

Parameters

string $path The path to the file:

Return value

string The mime type or NULL, if none could be guessed

Throws

FileNotFoundException If the file does not exist

AccessDeniedException If the file could not be read

Overrides MimeTypeGuesserInterface::guess

File

core/lib/Drupal/Core/File/MimeType/登录查看完整内容