You are here

function video_thumb_path in Video 6.5

Same name and namespace in other branches
  1. 6.4 video.module \video_thumb_path()
8 calls to video_thumb_path()
drupal::delete_video in filesystem/drupal.inc
Delete the video from the file system.
video_default_widget_settings_validate in ./video_widget.inc
Element specific validation for video default value.
video_localcommand::generate_thumbnails in transcoders/video_localcommand.inc
video_s3::delete_video in plugins/video_s3/filesystem/video_s3.inc
Delete the video from the file system.
video_upload_manual_thumb in ./video_widget.inc
Handle saving of manual thumbs

... See full list

1 string reference to 'video_thumb_path'
video_localcommand::admin_settings in transcoders/video_localcommand.inc

File

./video.module, line 520
Main file of the Video module.

Code

function video_thumb_path($video = NULL, $checkexistence = TRUE) {
  $dir = $basedir = file_directory_path() . '/' . variable_get('video_thumb_path', 'video_thumbs');
  if (is_array($video)) {
    $dir .= '/' . $video['fid'];
  }
  elseif (is_object($video)) {
    $dir .= '/' . $video->fid;
  }
  elseif ($video > 0) {
    $dir .= '/' . intval($video);
  }
  elseif ($video != NULL) {
    return NULL;
  }
  if ($checkexistence) {
    field_file_check_directory(file_directory_path(), FILE_CREATE_DIRECTORY);
    field_file_check_directory($basedir, FILE_CREATE_DIRECTORY);
    if ($dir != $basedir) {
      field_file_check_directory($dir, FILE_CREATE_DIRECTORY);
    }
  }
  return $dir;
}