You are here

function _video_get_filetype in Video 6.3

Same name and namespace in other branches
  1. 5 video.module \_video_get_filetype()
  2. 6 video.module \_video_get_filetype()
  3. 6.2 video.module \_video_get_filetype()

Pull the file extension from a filename

Parameters

$vidfile: string filename to get the filetype from.

Return value

string value of file type or boolean FALSE on error

1 call to _video_get_filetype()
_video_common_get_player in includes/common.inc
Get the object for the suitable player for the parameter resource

File

includes/common.inc, line 66
Add some common functions for the various video types supported

Code

function _video_get_filetype($vidfile) {
  if (strstr($vidfile, '.')) {

    //If file contains a "." then get the file extension after the ".
    $file_type = end(explode('.', $vidfile));
  }
  else {
    $file_type = FALSE;
  }
  return strtolower($file_type);
}