_drush_convert_path

  1. drupal
    1. 7 environment.inc function
Drupal 7 _drush_convert_path($path)

Converts a Windows path (dir1\dir2\dir3) into a Unix path (dir1/dir2/dir3). Also converts a cygwin "drive emulation" path (/cygdrive/c/dir1) into a proper drive path, still with Unix slashes (c:/dir1).

1 call to _drush_convert_path()

File

sites/all/modules/drush/includes/environment.inc, line 194
Functions used by drush to query the environment and setting the current configuration.

Code

function _drush_convert_path($path) {
  $path = str_replace('\\', '/', $path);
  $path = preg_replace('/^\/cygdrive\/([A-Za-z])(.*)$/', '\1:\2', $path);

  return $path;
}