protected String escapePath(String path){
  String escapedPath=path;
  if (escapedPath.contains("\\")) {
    if (escapedPath.contains(":\\")) {
      escapedPath='/' + escapedPath;
    }
    escapedPath=escapedPath.replace('\\','/');
  }
  return escapedPath;
}

protected String escapePath ( String path ) { String escapedPath = path ; if ( escapedPath . contains ( "\\" ) ) { if ( escapedPath . contains ( ":\\" ) ) { escapedPath = '/' + escapedPath ; } escapedPath = escapedPath . replace ( '\\' , '/' ) ; } return escapedPath ; }
escapes a windows path : backslashes become slashes , drive paths get prefixed with a slash .
