From 3a265cc2249214b2982cf2131bc7f9f64411f915 Mon Sep 17 00:00:00 2001 From: Will0376 <15551918+Will0376@users.noreply.github.com> Date: Tue, 16 Jun 2020 13:56:04 +0300 Subject: [PATCH] Create SyncAll.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Выплёвываю как есть. Регистрация где - я хз. Дальше сами. --- .../launchserver/command/hash/SyncAll.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncAll.java diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncAll.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncAll.java new file mode 100644 index 00000000..709ff13f --- /dev/null +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncAll.java @@ -0,0 +1,32 @@ +package pro.gravit.launchserver.command.hash; + +import pro.gravit.launchserver.LaunchServer; +import pro.gravit.launchserver.command.Command; +import pro.gravit.utils.helper.LogHelper; + +import java.io.IOException; + +public final class SyncAll extends Command { + public SyncAll(LaunchServer server) { + super(server); + } + + @Override + public String getArgsDescription() { + return null; + } + + @Override + public String getUsageDescription() { + return "Resync profiles & updates dirs"; + } + + @Override + public void invoke(String... args) throws IOException { + server.syncProfilesDir(); + LogHelper.subInfo("Profiles successfully resynced"); + + server.syncUpdatesDir(null); + LogHelper.subInfo("Updates dir successfully resynced"); + } +}