Ejemplo n.º 1
0
 /**
  * This small utility function takes care for escaping a path. This operation is platform
  * dependent so the result will differ on different platforms.
  *
  * @param orgPath the original plain path
  * @return the escaped path
  */
 private static String escapePath(@Nonnull final String orgPath) {
   if (OSDetection.isWindows()) {
     if (orgPath.contains(" ")) {
       return '"' + orgPath + '"';
     }
     return orgPath;
   }
   return orgPath.replace(" ", "\\ ");
 }