Files
purpur-fantasy-stick/src/main/java/games/dmg/fantasystick/persistence/DurableFiles.java
T
dmg 0042f539a5
Release / release (push) Successful in 9m39s
feat(party): persist character-owned parties
2026-09-21 07:46:58 -04:00

15 lines
522 B
Java

package games.dmg.fantasystick.persistence;
import java.io.IOException;
import java.nio.channels.FileChannel;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
/** Filesystem durability boundary used after atomically replacing or deleting acknowledged state. */
final class DurableFiles {
private DurableFiles() { }
static void forceDirectory(Path directory) throws IOException {
try (var channel = FileChannel.open(directory, StandardOpenOption.READ)) { channel.force(true); }
}
}