function drush_trim_path

8.0.x drush_trim_path($path, $os = NULL)
6.x drush_trim_path($path, $os = NULL)
7.x drush_trim_path($path, $os = NULL)
5.x drush_trim_path($path, $os = NULL)
master drush_trim_path($path, $os = NULL)

Remove the trailing DIRECTORY_SEPARATOR from a path. Will actually remove either / or \ on Windows.

Related topics

5 calls to drush_trim_path()
drush_normalize_path in includes/
Makes sure the path has only path separators native for the current operating system
drush_preflight_backup_dir in includes/
Decide where our backup directory should go
drush_sitealias_evaluate_path in includes/
Evaluate a path from its shorthand form to a literal path usable by rsync.
drush_tempdir in includes/
Creates a temporary directory and return its path.
package_handler_download_project in commands/pm/package_handler/
Download a project.


includes/, line 66


function drush_trim_path($path, $os = NULL) {
  if (drush_is_windows($os)) {
    return rtrim($path, '/\\');
  else {
    return rtrim($path, '/');