From 7e3cd92742383c43f2741449c551208e6487154e Mon Sep 17 00:00:00 2001 From: Keuin Date: Sat, 20 Jan 2024 13:20:41 +0800 Subject: feature: configurable CoW incremental backup --- .../keuin/kbackupfabric/util/cow/FileEagerCopier.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/main/java/com/keuin/kbackupfabric/util/cow/FileEagerCopier.java (limited to 'src/main/java/com/keuin/kbackupfabric/util/cow/FileEagerCopier.java') diff --git a/src/main/java/com/keuin/kbackupfabric/util/cow/FileEagerCopier.java b/src/main/java/com/keuin/kbackupfabric/util/cow/FileEagerCopier.java new file mode 100644 index 0000000..0f12374 --- /dev/null +++ b/src/main/java/com/keuin/kbackupfabric/util/cow/FileEagerCopier.java @@ -0,0 +1,17 @@ +package com.keuin.kbackupfabric.util.cow; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class FileEagerCopier implements FileCopier { + @Override + public void copy(String dst, String src) throws IOException { + Files.copy(Paths.get(src), Paths.get(dst)); + } + + @Override + public boolean isCow() { + return false; + } +} -- cgit v1.2.3