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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user