You are here

private function ExifPHPExtension::getFileType in Exif 8

Same name and namespace in other branches
  1. 8.2 src/ExifPHPExtension.php \Drupal\exif\ExifPHPExtension::getFileType()
  2. 7 ExifPHPExtension.php \Drupal\exif\ExifPHPExtension::getFileType()

Get extension from a path.

Parameters

string $file: Path to file.

Return value

string the extension.

1 call to ExifPHPExtension::getFileType()
ExifPHPExtension::readExifTags in src/ExifPHPExtension.php
Read Exif Information from a file.

File

src/ExifPHPExtension.php, line 195

Class

ExifPHPExtension
Class ExifPHPExtension Parser implementation base d on PHP Exif extension.

Namespace

Drupal\exif

Code

private function getFileType($file) {
  $ar = explode('.', $file);
  $ending = $ar[count($ar) - 1];
  return $ending;
}