function _drush_convert_path

8.0.x environment.inc _drush_convert_path($path)
6.x environment.inc _drush_convert_path($path)
7.x environment.inc _drush_convert_path($path)
3.x environment.inc _drush_convert_path($path)
4.x environment.inc _drush_convert_path($path)
5.x environment.inc _drush_convert_path($path)
master environment.inc _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()
drush_cwd in includes/environment.inc
Returns the current working directory.

File

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;
}