1
mirror of https://github.com/CarmJos/EasyConfiguration.git synced 2026-06-04 18:48:20 +08:00

feat(holder): Add file type multi configuration. #169

This commit is contained in:
2026-03-11 11:24:27 +08:00
parent f5316eb320
commit f54ee83938
@@ -17,9 +17,12 @@ public class MultiFileTests {
public void test() { public void test() {
ProfileStorage storage = new ProfileStorage(new File(new File("target"), "test-profiles")); ProfileStorage storage = new ProfileStorage(new File(new File("target"), "test-profiles"));
// Add (or create) a new entry to file.
UserProfile profile = new UserProfile(UUID.randomUUID(), "John Doe", "john@google.com", "123123123"); UserProfile profile = new UserProfile(UUID.randomUUID(), "John Doe", "john@google.com", "123123123");
storage.update(profile.getUniqueId(), profile); storage.update(profile.getUniqueId(), profile);
// Read files.
System.out.println("Current users: "); System.out.println("Current users: ");
storage.values().forEach((k, v) -> { storage.values().forEach((k, v) -> {
System.out.println("# " + k); System.out.println("# " + k);