You are here

function feeds_ex_library_path in Feeds extensible parsers 7.2

Same name and namespace in other branches
  1. 7 feeds_ex.module \feeds_ex_library_path()

Returns the path of a library.

Parameters

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

string $file: The filename to search for.

Return value

string|bool Returns the path of the library, or false if it does not exist.

3 calls to feeds_ex_library_path()
FeedsExJmesPath::loadLibrary in src/FeedsExJmesPath.inc
Loads the necessary library.
feeds_ex_feeds_plugins in ./feeds_ex.feeds.inc
Implements hook_feeds_plugins().
feeds_ex_registry_files_alter in ./feeds_ex.module
Implements hook_registry_files_alter().

File

./feeds_ex.module, line 80
A Feeds framework used to create extensible parsers.

Code

function feeds_ex_library_path($library, $file) {
  if (module_exists('libraries') && file_exists(libraries_get_path($library) . '/' . $file)) {
    return libraries_get_path($library) . '/' . $file;
  }
  elseif (file_exists(DRUPAL_ROOT . '/sites/all/libraries/' . $library . '/' . $file)) {
    return 'sites/all/libraries/' . $library . '/' . $file;
  }
  return FALSE;
}