> **Note:** You can easily validate file uploads using the [Validator class](/docs/validation).
<a name="ext"></a>
## File Extensions
#### Getting the extension from a filename:
File::extension('picture.png');
<a name="is"></a>
## Checking File Types
#### Determining if a file is given type:
if (File::is('jpg', 'path/to/file.jpg'))
{
//
}
The **is** method does not simply check the file extension. The Fileinfo PHP extension will be used to read the content of the file and determine the actual MIME type.
> **Note:** You may pass any of the extensions defined in the **application/config/mimes.php** file to the **is** method.
> **Note:** The Fileinfo PHP extension is required for this functionality. More information can be found on the [PHP Fileinfo page](http://php.net/manual/en/book.fileinfo.php).
<a name="mime"></a>
## Getting MIME Types
#### Getting the MIME type associated with an extension: