code: public static String normalizePath(String path)
    {
      if(File.separatorChar == '/') {
        return path.replace('\\', '/');
      }
      return path.replace('/', '\\');
    }
docs: Ensure that path separators are compatible with current operating system.
  
  @param path path to normalize.
  @return normalized path.