$file->type()
Returns the file type
Return type
string
|null
Parent class
Example
All file types
Type | Extensions |
---|---|
image | jpg, gif, png, svg, ico, tiff, bmp, psd, ai, webp (since v3.2.0) |
document | md, pdf, doc, docx, xls, xlsx, ppt, csv, rtf |
archive | zip, tar, gz, gzip, tgz |
code | js, css, html, xml, json |
video | mov, avi, ogg, ogv, webm, flv, swf, mp4, mv4 |
audio | mp3, m4a, wav, aiff, midi |