You are here

public function MimeTypeGuesserInterface::guess in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php \Symfony\Component\HttpFoundation\File\MimeType\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

7 methods override MimeTypeGuesserInterface::guess()
ExtensionMimeTypeGuesser::guess in core/lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php
Guesses the mime type of the file with the given path.
ExtensionMimeTypeGuesser::guess in core/lib/Drupal/Core/ProxyClass/File/MimeType/ExtensionMimeTypeGuesser.php
Guesses the mime type of the file with the given path.
FileBinaryMimeTypeGuesser::guess in vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php
Guesses the mime type of the file with the given path.
FileinfoMimeTypeGuesser::guess in vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php
Guesses the mime type of the file with the given path.
MimeTypeGuesser::guess in vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php
Tries to guess the mime type of the given file.

... See full list

File

vendor/symfony/http-foundation/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);