Class FileSync
java.lang.Object
de.bsvrz.ars.ars.persistence.util.FileSync
public class FileSync
extends java.lang.Object
Hilfsklasse um einen Ordner auf einen Zuielordner zu kopieren (zu synchronisieren) ohne alles erneut zu übertragen.
-
Constructor Summary
Constructors Constructor Description FileSync()
-
Method Summary
Modifier and Type Method Description static boolean
isIdentical(java.nio.file.Path sourceFile, java.nio.file.Path targetFile)
protected boolean
shouldIgnore(java.lang.String fileName)
SyncResult
syncDirectories(java.nio.file.Path from, java.nio.file.Path to)
Synchronisiert zwei Verzeichnisse.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FileSync
public FileSync()
-
-
Method Details
-
syncDirectories
public SyncResult syncDirectories(java.nio.file.Path from, java.nio.file.Path to) throws java.io.IOExceptionSynchronisiert zwei Verzeichnisse.- Parameters:
from
- Quellverzeichnisto
- Zielverzeichnis- Returns:
- Statistik über kopierte Daten
- Throws:
java.io.IOException
- IO-Problem
-
shouldIgnore
protected boolean shouldIgnore(java.lang.String fileName) -
isIdentical
public static boolean isIdentical(java.nio.file.Path sourceFile, java.nio.file.Path targetFile) throws java.io.IOException- Throws:
java.io.IOException
-