IMimeTypeDetector¶
-
interface
OCP\Files\
IMimeTypeDetector
¶ - Interface IMimeTypeDetector
Implemented by: OC\Files\Type\Detection
Source: lib/public/Files/IMimeTypeDetector.php#35
Methods¶
-
public
OCP\Files\IMimeTypeDetector::
detectPath
($path)¶ - detect mimetype only based on filename, content of file is not used
Source: Parameters: - $path (string)
Returns: string
Since: 8.2.0
-
public
OCP\Files\IMimeTypeDetector::
detectContent
($path)¶ - detect mimetype only based on the content of file
Source: Parameters: - $path (string)
Returns: string
Since: 18.0.0
-
public
OCP\Files\IMimeTypeDetector::
detect
($path)¶ - detect mimetype based on both filename and content
Source: Parameters: - $path (string)
Returns: string
Since: 8.2.0
-
public
OCP\Files\IMimeTypeDetector::
getSecureMimeType
($mimeType)¶ - Get a secure mimetype that won’t expose potential XSS.
Source: Parameters: - $mimeType (string)
Returns: string
Since: 8.2.0
-
public
OCP\Files\IMimeTypeDetector::
detectString
($data)¶ - detect mimetype based on the content of a string
Source: Parameters: - $data (string)
Returns: string
Since: 8.2.0
-
public
OCP\Files\IMimeTypeDetector::
mimeTypeIcon
($mimeType)¶ - Get path to the icon of a file type
Source: Parameters: - $mimeType (string) the MIME type
Returns: string the url
Since: 8.2.0