You are here

function swftools_get_playlist_path in SWF Tools 5

Same name and namespace in other branches
  1. 6 swftools.module \swftools_get_playlist_path()
  2. 6.2 swftools.module \swftools_get_playlist_path()

Returns the playlist path relative to webroot. This path needs to be writeable, so it is fitting to limit valid locations to the files directory.

2 calls to swftools_get_playlist_path()
swftools_generate_playlist in ./swftools.module
Saves a playlist/xml file to a directory ready for the browser callback. Data must be formatted correctly, see docs (link to come) Returns a fully qualified url to the playlist file
_swftools_admin_handling_form in ./swftools.admin.inc

File

./swftools.module, line 599

Code

function swftools_get_playlist_path($dir = FALSE) {
  if (!$dir) {
    $dir = variable_get('swftools_playlist_path', SWFTOOLS_PLAYLIST_PATH);
  }
  $dir = file_create_path($dir);

  // Create playlist directory if necessary
  if (!file_check_directory($dir, FILE_CREATE_DIRECTORY)) {
    drupal_set_message("{$dir} does not exist, or is not writeable.");
  }
  return $dir;
}