function drush_is_nested_directory

8.0.x drush_is_nested_directory($base_dir, $test_is_nested)
master drush_is_nested_directory($base_dir, $test_is_nested)

Return 'TRUE' if one directory is located anywhere inside the other.

Related topics

1 call to drush_is_nested_directory()
drush_preflight_command_dispatch in includes/
Handle any command preprocessing that may need to be done, including potentially redispatching the command immediately (e.g. for remote commands).


includes/, line 741
Filesystem utilities.


function drush_is_nested_directory($base_dir, $test_is_nested) {
  $common = Path::getLongestCommonBasePath([$test_is_nested $base_dir]);
  return $common == Path::canonicalize($base_dir);