mainPlugin/src/main/java/org/simpleyaml/configuration/file/YamlFile.java
/**
     * Creates a new {@link YamlFile}, loading from the given file.
     * <p>
     * Any errors loading the Configuration will be logged and then ignored.
     * If the specified input is not a valid config, a blank config will be
     * returned.
     * <p>
     * This method will use the {@link #options()} {@link FileConfigurationOptions#charset() charset} encoding,
     * which defaults to UTF8.
     *
     * @param file Input file
     * @param withComments if comments should be parsed
     * @return Resulting configuration
     * @throws IllegalArgumentException Thrown if file is null
     */
Creates a new  YamlFile, loading from the given file.

Any errors loading the Configuration will be logged and then ignored.
If the specified input is not a valid config, a blank config will be
returned.

This method will use the  #options()  FileConfigurationOptions#charset() charset encoding,
which defaults to UTF8.

@param file Input file
@param withComments if comments should be parsed
@return Resulting configuration
@throws IllegalArgumentException Thrown if file is null
Creates a new YamlFile loading from the given file . Any errors loading the Configuration will be logged and then ignored . If the specified input is not a valid config a blank config will be returned . This method will use the #options () FileConfigurationOptions#charset () charset encoding which defaults to UTF8 . @param file Input file @param withComments if comments should be parsed @return Resulting configuration @throws IllegalArgumentException Thrown if file is null
public static YamlFile loadConfiguration(final File file, boolean withComments) {
        Validate.notNull(file, "File cannot be null");
        return load(config -> {
            config.setConfigurationFile(file);
            config.load();
        }, withComments);
    }
public static YamlFile loadConfiguration ( final File file , boolean withComments ) { Validate . notNull ( file , "File cannot be null" ) ; return load ( config -> { config . setConfigurationFile ( file ) ; config . load ( ) ; } , withComments ) ; }
Creates a new {@link YamlFile}, loading from the given file.
Creates a new { @link YamlFile } loading from the given file .