You are here

function views_data_export_is_export_file in Views data export 7.3

Checks whether the passed URI identifies an export file.

Parameters

string $uri: A file URI.

Return value

bool TRUE if the URI identifies an export file, FALSE otherwise.

File

./views_data_export.module, line 43
Provides the ability to export to specific

Code

function views_data_export_is_export_file($uri) {
  foreach (entity_load('file', FALSE, array(
    'uri' => $uri,
  )) as $file) {

    // See if this is an export file.
    $usages = file_usage_list($file);
    return !empty($usages['views_data_export']['eid']);
  }
  return FALSE;
}