summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/KBCommands.java
diff options
context:
space:
mode:
authorKeuin <[email protected]>2020-12-17 00:21:13 +0800
committerkeuin <[email protected]>2020-12-17 00:21:13 +0800
commit8b05c48d76bbb05c2b440e57df1d9b3323edc598 (patch)
tree941c5b51e45b074bcc8656e457c9f582211df754 /src/main/java/com/keuin/kbackupfabric/KBCommands.java
parentfd9124f475422f62691fb542c3f8f35790b65d9b (diff)
Implementing incremental backup. (in progress)
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/KBCommands.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/KBCommands.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/KBCommands.java b/src/main/java/com/keuin/kbackupfabric/KBCommands.java
index bc04291..571333f 100644
--- a/src/main/java/com/keuin/kbackupfabric/KBCommands.java
+++ b/src/main/java/com/keuin/kbackupfabric/KBCommands.java
@@ -8,21 +8,24 @@ import com.keuin.kbackupfabric.operation.abstracts.i.Invokable;
import com.keuin.kbackupfabric.operation.backup.BackupMethod;
import com.keuin.kbackupfabric.operation.backup.IncrementalBackupMethod;
import com.keuin.kbackupfabric.operation.backup.PrimitiveBackupMethod;
+import com.keuin.kbackupfabric.util.PrintUtil;
import com.keuin.kbackupfabric.util.backup.BackupFilesystemUtil;
+import com.keuin.kbackupfabric.util.backup.BackupNameTimeFormatter;
import com.keuin.kbackupfabric.util.backup.BackupType;
import com.keuin.kbackupfabric.util.backup.suggestion.BackupNameSuggestionProvider;
-import com.keuin.kbackupfabric.util.backup.BackupNameTimeFormatter;
-import com.keuin.kbackupfabric.util.PrintUtil;
import com.mojang.brigadier.arguments.StringArgumentType;
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.command.ServerCommandSource;
import java.io.File;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
-import static com.keuin.kbackupfabric.util.backup.BackupFilesystemUtil.*;
import static com.keuin.kbackupfabric.util.PrintUtil.*;
+import static com.keuin.kbackupfabric.util.backup.BackupFilesystemUtil.*;
public final class KBCommands {
@@ -298,7 +301,7 @@ public final class KBCommands {
} else {
++i;
}
- msgInfo(context, String.format("The most recent backup: [%d] %s , size: %s", i, backupName, humanFileSize(prevBackupFile.length())));
+ msgInfo(context, String.format("The most recent backup: [%d] %s , size: %s", i, backupName, getFriendlyFileSizeString(prevBackupFile.length())));
} catch (NullPointerException e) {
msgInfo(context, "There are no backups available.");
} catch (SecurityException ignored) {