code: public static void movePath(FileSystem srcFs, Path src, FileSystem dstFs, Path dst, boolean overwrite,
        Configuration conf) throws IOException {
  
      if (srcFs.getUri().getScheme().equals(dstFs.getUri().getScheme())
          && !FS_SCHEMES_NON_ATOMIC.contains(srcFs.getUri().getScheme())
          && !FS_SCHEMES_NON_ATOMIC.contains(dstFs.getUri().getScheme())) {
        renamePath(srcFs, src, dst);
      } else {
        copyPath(srcFs, src, dstFs, dst, true, overwrite, conf);
      }
    }
docs: Moves a src {@link Path} from a srcFs {@link FileSystem} to a dst {@link Path} on a dstFs {@link FileSystem}. If
  the srcFs and the dstFs have the same scheme, and neither of them or S3 schemes, then the {@link Path} is simply
  renamed. Otherwise, the data is from the src {@link Path} to the dst {@link Path}. So this method can handle copying
  data between different {@link FileSystem} implementations.
  
  @param srcFs the source {@link FileSystem} where the src {@link Path} exists
  @param src the source {@link Path} which will me moved
  @param dstFs the destination {@link FileSystem} where the dst {@link Path} should be created
  @param dst the {@link Path} to move data to
  @param overwrite true if the destination should be overwritten; otherwise, false