code: static String path2absoluteSlashSeparatedString(final Path path) {
          final String pathAsAStringBefore = path.toString();
          String pathAsAStringAfter = pathAsAStringBefore;
          String separator = FileSystems.getDefault().getSeparator();
          if ( pathAsAStringAfter != null
               &&
               ( pathAsAStringAfter.length() == 0
                 ||
                 !(
                    pathAsAStringAfter.startsWith("\\") ||
                    pathAsAStringAfter.startsWith("/")
                 )
               )
             ) {
              pathAsAStringAfter = separator + pathAsAStringAfter;
          }
          // why M$ Windows ? why ?
          if (separator.equals("\\")) {
              pathAsAStringAfter = pathAsAStringAfter.replaceAll("\\\\", "/");
          }
  
          if (pathAsAStringBefore.equals(pathAsAStringAfter)) {
              log.trace("Path parameter '{}' transformed to '{}'", pathAsAStringBefore, pathAsAStringAfter);
          }
  
          return pathAsAStringAfter;
      }
docs: convert Path to String, absolutize, ensure that separator is '/'.