fe/src/main/java/org/apache/doris/plugin/DynamicPluginLoader.java
Path movePlugin() throws UserException, IOException {

        if (installPath == null || !Files.exists(installPath)) {
            throw new UserException("Install plugin " + pluginInfo.getName() + " failed, because install path isn't "
                    + "exists.");
        }

        Path targetPath = FileSystems.getDefault().getPath(pluginDir.toString(), pluginInfo.getName());
        if (Files.exists(targetPath)) {
            if (!Files.isSameFile(installPath, targetPath)) {
                throw new UserException(
                        "Install plugin " + pluginInfo.getName() + " failed. because " + installPath.toString()
                                + " exists");
            }
        } else {
            Files.move(installPath, targetPath, StandardCopyOption.ATOMIC_MOVE);
        }

        // move success
        installPath = targetPath;

        return installPath;
    }
/**
     * move plugin's temp install directory to Doris's PLUGIN_DIR
     */
move plugin's temp install directory to Doris's PLUGIN_DIR
move plugin ' s temp install directory to Doris ' s PLUGIN_DIR
Path movePlugin() throws UserException, IOException {
        if (installPath == null || !Files.exists(installPath)) {
            throw new UserException("Install plugin " + pluginInfo.getName() + " failed, because install path isn't "
                    + "exists.");
        }
        Path targetPath = FileSystems.getDefault().getPath(pluginDir.toString(), pluginInfo.getName());
        if (Files.exists(targetPath)) {
            if (!Files.isSameFile(installPath, targetPath)) {
                throw new UserException(
                        "Install plugin " + pluginInfo.getName() + " failed. because " + installPath.toString()
                                + " exists");
            }
        } else {
            Files.move(installPath, targetPath, StandardCopyOption.ATOMIC_MOVE);
        }
        installPath = targetPath;
        return installPath;
    }
Path movePlugin ( ) throws UserException , IOException { if ( installPath == null || ! Files . exists ( installPath ) ) { throw new UserException ( "Install plugin " + pluginInfo . getName ( ) + " failed, because install path isn't " + "exists." ) ; } Path targetPath = FileSystems . getDefault ( ) . getPath ( pluginDir . toString ( ) , pluginInfo . getName ( ) ) ; if ( Files . exists ( targetPath ) ) { if ( ! Files . isSameFile ( installPath , targetPath ) ) { throw new UserException ( "Install plugin " + pluginInfo . getName ( ) + " failed. because " + installPath . toString ( ) + " exists" ) ; } } else { Files . move ( installPath , targetPath , StandardCopyOption . ATOMIC_MOVE ) ; } installPath = targetPath ; return installPath ; }
move plugin's temp install directory to Doris's PLUGIN_DIR
move plugin ' s temp install directory to Doris ' s PLUGIN_DIR
// move success