You are here

function rdf_arc2_library_path in Taxonomy import/export via XML 7

Return the path of the arc2 library.

Semi-intelligent lookup of places I expect it to be.

2 calls to rdf_arc2_library_path()
rdf_load_arc2 in ./rdf_utils.inc
Loads the arc2 library from likely location.
taxonomy_xml_rdf_requirements in ./rdf_utils.inc
Check ARC RDF library is available.

File

./rdf_utils.inc, line 186
Experimental library for working with RDF within taxonomy_xml

Code

function rdf_arc2_library_path() {
  $arc2_library_path = variable_get('arc2_library_path', '');
  if (is_readable($arc2_library_path)) {
    return $arc2_library_path;
  }

  // Try other spots?
  $possibilities = array(
    'sites/all/libraries/ARC2/arc',
    // RDFX may have wanted to install it here
    'sites/all/libraries/arc',
    dirname(__FILE__) . '/arc',
  );
  foreach ($possibilities as $arc2_library_path) {
    if (is_readable($arc2_library_path)) {
      variable_set('arc2_library_path', $arc2_library_path);
      return $arc2_library_path;
    }
  }
  return NULL;
}