code: @Nonnull
      public static String getFileSeparatorOnRemote(@Nonnull FilePath filePath) {
          int indexOfSlash = filePath.getRemote().indexOf('/');
          int indexOfBackSlash = filePath.getRemote().indexOf('\\');
          if (indexOfSlash == -1) {
              return "\\";
          } else if (indexOfBackSlash == -1) {
              return "/";
          } else if (indexOfSlash < indexOfBackSlash) {
              return "/";
          } else {
              return "\\";
          }
      }
docs: Return the File separator "/" or "\" that is effective on the remote agent.
  
  @param filePath
  @return "/" or "\"