summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.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/operation/BackupOperation.java
parentfd9124f475422f62691fb542c3f8f35790b65d9b (diff)
Implementing incremental backup. (in progress)
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.java b/src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.java
index d03c347..465b293 100644
--- a/src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.java
+++ b/src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.java
@@ -1,12 +1,8 @@
package com.keuin.kbackupfabric.operation;
-import com.keuin.kbackupfabric.exception.ZipUtilException;
-import com.keuin.kbackupfabric.metadata.BackupMetadata;
import com.keuin.kbackupfabric.operation.abstracts.InvokableAsyncBlockingOperation;
import com.keuin.kbackupfabric.operation.backup.BackupMethod;
import com.keuin.kbackupfabric.util.PrintUtil;
-import com.keuin.kbackupfabric.util.backup.builder.BackupFileNameBuilder;
-import com.keuin.kbackupfabric.util.backup.formatter.BackupFileNameFormatter;
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.command.ServerCommandSource;
@@ -17,8 +13,8 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import static com.keuin.kbackupfabric.util.backup.BackupFilesystemUtil.*;
import static com.keuin.kbackupfabric.util.PrintUtil.msgInfo;
+import static com.keuin.kbackupfabric.util.backup.BackupFilesystemUtil.*;
public class BackupOperation extends InvokableAsyncBlockingOperation {
@@ -64,7 +60,7 @@ public class BackupOperation extends InvokableAsyncBlockingOperation {
long timeElapsedMillis = System.currentTimeMillis() - startTime;
String msgText = String.format("Backup finished. Time elapsed: %.2fs.", timeElapsedMillis / 1000.0);
File backupZipFile = new File(backupSaveDirectory, backupFileName);
- msgText += String.format(" File size: %s.", humanFileSize(result.getBackupSizeBytes()));
+ msgText += String.format(" File size: %s.", getFriendlyFileSizeString(result.getBackupSizeBytes()));
PrintUtil.msgInfo(context, msgText, true);
} else {
// failed