You are here

function feeds_library_exists in Feeds 7

Same name and namespace in other branches
  1. 8.2 feeds.module \feeds_library_exists()
  2. 6 feeds.module \feeds_library_exists()
  3. 7.2 feeds.module \feeds_library_exists()

Checks whether a library is present.

Parameters

$file: The filename to load from.

$library: The name of the library. If libraries module is installed, feeds_library_exists() will look for libraries with this name managed by libraries module.

Related topics

1 call to feeds_library_exists()
_feeds_feeds_plugins in ./feeds.plugins.inc
Break out for feeds_feed_plugins().

File

./feeds.module, line 817
Feeds - basic API functions and hook implementations.

Code

function feeds_library_exists($file, $library) {
  if (module_exists('libraries') && file_exists(libraries_get_path($library) . "/{$file}")) {
    return TRUE;
  }
  elseif (file_exists(DRUPAL_ROOT . '/' . drupal_get_path('module', 'feeds') . "/libraries/{$file}")) {
    return TRUE;
  }
  return FALSE;
}