function _drush_feeds_find_file in Feeds 7.2
Tries to find the specified file at several locations.
Parameters
string $filename: The file to look for.
Return value
string If found, the file that was found. NULL otherwise.
1 call to _drush_feeds_find_file()
- drush_feeds_import in ./
feeds.drush.inc - Imports a given importer/source.
File
- ./
feeds.drush.inc, line 851 - Drush commands for Feeds module.
Code
function _drush_feeds_find_file($filename) {
// If the full path to the file is specified, the file will be found right
// away.
if (is_file($filename)) {
// Found!
return $filename;
}
// Look for the file within the current active directory.
$search = drush_cwd() . '/' . $filename;
if (is_file($search)) {
// Found!
return $search;
}
// Look for the file within the directory Drupal is installed in.
// bootstrap_drupal_root() sets the active directory to the Drupal root.
$search = getcwd() . '/' . $filename;
if (is_file($search)) {
// Found!
return $search;
}
}