function feeds_library_exists in Feeds 6
Same name and namespace in other branches
- 8.2 feeds.module \feeds_library_exists()
- 7.2 feeds.module \feeds_library_exists()
- 7 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 937 - 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_get_path('module', 'feeds') . "/libraries/{$file}")) {
return TRUE;
}
return FALSE;
}