public class YamlConfigFile extends ConfigFile<ninja.leaping.configurate.ConfigurationNode>
ConfigFile for the YAML specification.| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER
The YamlConfigFile logger.
|
| Constructor and Description |
|---|
YamlConfigFile(java.nio.file.Path file,
ninja.leaping.configurate.loader.ConfigurationLoader<ninja.leaping.configurate.ConfigurationNode> loader,
ninja.leaping.configurate.ConfigurationNode root)
Constructs a new
YamlConfigFile. |
| Modifier and Type | Method and Description |
|---|---|
static YamlConfigFile |
load(java.nio.file.Path file)
Creates a
YamlConfigFile. |
static YamlConfigFile |
load(java.nio.file.Path file,
java.lang.String resource)
Creates a
YamlConfigFile. |
static YamlConfigFile |
load(java.nio.file.Path file,
java.lang.String resource,
boolean overwrite)
Creates a
YamlConfigFile. |
static YamlConfigFile |
load(java.nio.file.Path file,
java.lang.String resource,
boolean overwrite,
boolean merge)
Deprecated.
|
getFile, getFileDirectory, getLoader, getNode, getNode, getNode, reload, reloadWithException, save, saveWithExceptionpublic YamlConfigFile(@Nonnull
java.nio.file.Path file,
@Nonnull
ninja.leaping.configurate.loader.ConfigurationLoader<ninja.leaping.configurate.ConfigurationNode> loader,
@Nonnull
ninja.leaping.configurate.ConfigurationNode root)
YamlConfigFile.file - the location of the configuration file on diskloader - the active loaded for the configuration file on diskroot - the loaded ConfigurationNode at the root levelpublic static YamlConfigFile load(java.nio.file.Path file) throws java.io.IOException
YamlConfigFile.file - the location of the config file on diskYamlConfigFilejava.io.IOException - if files cannot be properly deleted/createdpublic static YamlConfigFile load(@Nonnull java.nio.file.Path file, @Nonnull java.lang.String resource) throws java.io.IOException
YamlConfigFile.
Also merges a configuration file from classpath into the file on disk.
file - the location of the config file on diskresource - the location of the resource in the classpathYamlConfigFilejava.io.IOException - if files cannot be properly deleted/createdpublic static YamlConfigFile load(@Nonnull java.nio.file.Path file, @Nullable java.lang.String resource, boolean overwrite) throws java.io.IOException
YamlConfigFile.
Also merges a configuration file from the classpath into the file on disk.
May delete file on disk before copying resource.
file - the location of the config file on diskresource - the location of the resource in the classpathoverwrite - whether or not to delete the file on disk before copying resourceYamlConfigFilejava.io.IOException - if files cannot be properly deleted/created@Deprecated public static YamlConfigFile load(@Nonnull java.nio.file.Path file, @Nullable java.lang.String resource, boolean overwrite, boolean merge) throws java.io.IOException
YamlConfigFile.
May merge a configuration file from the classpath into the file on disk.
May delete the file on disk before copying resource.
If accessing this method directly, keep in mind that passing true
for overwrite but false for merge is going
to result in a non-existent file on disk.
file - the location of the config file on diskresource - the location of the resource in the classpathoverwrite - whether or not to delete the file on disk before copying the resourcemerge - whether or not to merge the resource into the file on diskYamlConfigFilejava.io.IOException - if files cannot be properly deleted/created