FileAccess Orion

MimeTypeGuesserInterface

Guesses the mime type of a file.

Tags
author

Bernhard Schussek bschussek@gmail.com

deprecated

since Symfony 4.3, use instead

Table of Contents

guess()  : string|null
Guesses the mime type of the file with the given path.

Methods

guess()

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

public guess(string $path) : string|null
Parameters
$path : string

The path to the file

Tags
throws
FileNotFoundException

If the file does not exist

throws
AccessDeniedException

If the file could not be read

Return values
string|null

The mime type or NULL, if none could be guessed

Search results