Class FileBackend
java.lang.Object
org.polyfrost.oneconfig.api.config.v1.backend.Backend
org.polyfrost.oneconfig.api.config.v1.backend.impl.FileBackend
public class FileBackend
extends org.polyfrost.oneconfig.api.config.v1.backend.Backend
-
Nested Class Summary
Nested classes/interfaces inherited from class org.polyfrost.oneconfig.api.config.v1.backend.Backend
org.polyfrost.oneconfig.api.config.v1.backend.Backend.RegistrationResult -
Field Summary
FieldsFields inherited from class org.polyfrost.oneconfig.api.config.v1.backend.Backend
CUSTOM_SAVE_DIRTY_METADATA, CUSTOM_SAVE_TRACKED_METADATA, LOGGER, UI_ONLY_METADATA, UI_PLACEHOLDER_METADATA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSerializer(FileSerializer<String> serializer) voidprotected booleancorrupt0(org.polyfrost.oneconfig.api.config.v1.Tree t) protected booleandelete0(@NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree) voidCollection<org.polyfrost.oneconfig.api.config.v1.Tree> Gather all files in this directory and make trees of them where possibleCollection<org.polyfrost.oneconfig.api.config.v1.Tree> Inspect all files in this directory (and optionally the given directory) and make trees of them where possibleprotected FileSerializer<String> @UnmodifiableView Collection<FileSerializer<String>> booleanprotected org.polyfrost.oneconfig.api.config.v1.Treeorg.polyfrost.oneconfig.api.config.v1.Treeprotected static Pathprotected static Stringbooleansave0(@NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree) protected static voidMethods inherited from class org.polyfrost.oneconfig.api.config.v1.backend.Backend
corrupt, delete, exists, get, getTrees, lastSaveFailure, load, load, putSafe, register, requestUpdate, requestUpdate, save, save, saveAll, saveAll, unregister
-
Field Details
-
folder
-
-
Constructor Details
-
FileBackend
-
-
Method Details
-
mkdirs
-
read
-
write
-
addWatcher
- Throws:
IOException
-
hasWatcher
public boolean hasWatcher() -
closeWatcher
public void closeWatcher() -
dodge
-
load0
- Throws:
Exception
-
load0
protected org.polyfrost.oneconfig.api.config.v1.Tree load0(@NotNull @NotNull String id) throws Exception - Specified by:
load0in classorg.polyfrost.oneconfig.api.config.v1.backend.Backend- Throws:
Exception
-
save0
public boolean save0(@NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree) - Specified by:
save0in classorg.polyfrost.oneconfig.api.config.v1.backend.Backend
-
delete0
protected boolean delete0(@NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree) throws Exception - Specified by:
delete0in classorg.polyfrost.oneconfig.api.config.v1.backend.Backend- Throws:
Exception
-
gatherAll
Gather all files in this directory and make trees of them where possible -
gatherAll
public Collection<org.polyfrost.oneconfig.api.config.v1.Tree> gatherAll(@Nullable @Nullable String sub) Inspect all files in this directory (and optionally the given directory) and make trees of them where possible -
getSerializers
-
addSerializer
-
corrupt0
protected boolean corrupt0(org.polyfrost.oneconfig.api.config.v1.Tree t) - Specified by:
corrupt0in classorg.polyfrost.oneconfig.api.config.v1.backend.Backend
-
getSerializer
-