mainPlugin/src/main/java/org/simpleyaml/configuration/file/YamlFile.java
/**
     * Creates a new empty file atomically for this configuration file.
     * <p>
     * Parent directories will be created if they do not exist.
     *
     * @param overwrite indicates if file must be overwritten if it already exists.
     *                  Note that if overwrite is set to false and there is already a file with that path file
     *                  will not be created and no exception is thrown.
     * @throws IOException if I/O error occurs creating the configuration file
     */
Creates a new empty file atomically for this configuration file.

Parent directories will be created if they do not exist.

@param overwrite indicates if file must be overwritten if it already exists.
Note that if overwrite is set to false and there is already a file with that path file
will not be created and no exception is thrown.
@throws IOException if I/O error occurs creating the configuration file
Creates a new empty file atomically for this configuration file . Parent directories will be created if they do not exist . @param overwrite indicates if file must be overwritten if it already exists . Note that if overwrite is set to false and there is already a file with that path file will not be created and no exception is thrown . @throws IOException if I / O error occurs creating the configuration file
public void createNewFile(final boolean overwrite) throws IOException {
        Validate.notNull(this.configFile, "This configuration file is null!");
        if (overwrite || !this.configFile.exists()) {
            try {
                final File parents = this.configFile.getParentFile();
                if (parents != null) {
                    parents.mkdirs();
                }
                this.configFile.createNewFile();
            } catch (final SecurityException e) {
                throw new IOException(e.getMessage(), e.getCause());
            }
        }
    }
public void createNewFile ( final boolean overwrite ) throws IOException { Validate . notNull ( this . configFile , "This configuration file is null!" ) ; if ( overwrite || ! this . configFile . exists ( ) ) { try { final File parents = this . configFile . getParentFile ( ) ; if ( parents != null ) { parents . mkdirs ( ) ; } this . configFile . createNewFile ( ) ; } catch ( final SecurityException e ) { throw new IOException ( e . getMessage ( ) , e . getCause ( ) ) ; } } }
Creates a new empty file atomically for this configuration file.
Creates a new empty file atomically for this configuration file .