public function MimeTypeGuesserInterface::guess

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

3 methods override MimeTypeGuesserInterface::guess()
FileBinaryMimeTypeGuesser::guess in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php
Guesses the mime type of the file with the given path.
FileinfoMimeTypeGuesser::guess in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php
Guesses the mime type of the file with the given path.
MimeTypeGuesser::guess in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php
Tries to guess the mime type of the given file

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php, line 34

Class

MimeTypeGuesserInterface
Guesses the mime type of a file

Namespace

Symfony\Component\HttpFoundation\File\MimeType

Code

public function guess($path);