You are here

function video_get_filesystem in Video 6.5

Get file system instance

Parameters

$name: Plugin name (eg. drupal), NULL for current

Return value

video_filesystem The current file system

6 calls to video_get_filesystem()
video_filesystem_admin_settings in ./video.admin.inc
File system admin settings
video_filesystem_admin_settings_validate in ./video.admin.inc
video_file_delete in ./video.module
Implementation of hook_file_delete().
video_helper::video_object in includes/video_helper.inc
video_process_video in ./video.module

... See full list

File

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

Code

function video_get_filesystem($name = NULL) {
  if ($name === NULL) {
    $name = variable_get('vid_filesystem', 'drupal');
  }
  ctools_include('plugins');
  module_load_include('lib.inc', 'video');
  $plugin = ctools_get_plugins('video', 'filesystem', $name);
  if ($plugin && $plugin['valid']) {
    require_once $plugin['path'] . '/' . $plugin['file'];
    return new $plugin['class']();
  }
  return NULL;
}