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
LOGGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSerializer(FileSerializer<String> serializer) protected booleancorrupt0(org.polyfrost.oneconfig.api.config.v1.Tree t) protected booleandelete0(@NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree) voiddodge()Collection<org.polyfrost.oneconfig.api.config.v1.Tree> Gather all files in this directory and make trees of them where possible.Collection<org.polyfrost.oneconfig.api.config.v1.Tree> Inspect all files in this directory (and optionally the given directory) and make trees of them where possible.protected 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, load, load, putSafe, register, requestUpdate, save, save, saveAll, saveAll
-
Field Details
-
folder
-
-
Constructor Details
-
FileBackend
-
-
Method Details
-
mkdirs
-
read
-
write
-
addWatcher
- Throws:
IOException
-
hasWatcher
public boolean hasWatcher() -
dodge
public void 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
-