SymfonyComponentHttpFoundationFileMimeTypeMimeTypeGuesserInterface

Guesses the mime type of a file

Summary

No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

guess()

guess(string  $path) : string

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

Parameters

string $path

The path to the file

Throws

SymfonyComponentHttpFoundationFileExceptionFileNotFoundException

If the file does not exist

SymfonyComponentHttpFoundationFileExceptionAccessDeniedException

If the file could not be read

Returns

string —

The mime type or NULL, if none could be guessed

Tags

None found