Skip to content

This Java project is designed to handle YAML (.yml) files without the use of an external API. It uses the built-in Java libraries to read, parse and manipulate YAML data, providing developers with a lightweight and efficient solution for working with YAML files in their Java applications.

License

Notifications You must be signed in to change notification settings

endknife/ConfigurationFile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Documentation for
ConfigurationFile

The `ConfigurationFile 1.02` class provides a way to create and manage configuration files. It contains methods to read, write, and manipulate configuration data. The class allows users to create and manage files containing simple variables, and supports the ability to create and manipulate more complex data types like lists.

What is new

  • Version 1.0 Beta 13/03/2023

    • Optimisation of code
    • Mor readable code
  • Version 0.9 03/06/23

    • Arrays completely added
    • Some optimisations
    • Added example.yml

Table of Contents

  • 1. Class Variables

  • 2. Constructors

  • 3. Public Methods

    • 1. add(String path, String value)
    • 2. add(String path, String[] array)
    • 3. getString(String path)
    • 4. getArray(String path)
    • 5. getArray(String path, int value)
    • 6. modifyString(String path, String value)
    • 7. deleteString(String path)
    • 8. deleteAll()
    • 9. saveFile()
    • 10. isEmpty()
  • 4. Private Methods

    • 1. readFile()
    • 2. writeFile()

Class Variables

  • REMOVE: a String constant representing a tab character that is used to remove tab characters from the configuration file.
  • RESET: a String constant representing a color code that resets console text color.
  • BLACK, RED, GREEN, YELLOW, BLUE, PURPLE, CYAN, WHITE: String constants representing color codes that are used to color console output.
  • file: a File object representing the configuration file.
  • data: a HashMap object containing the configuration data.

Constructor

The ConfigurationFile constructor takes a single parameter, which is the path to the configuration file. It creates a new configuration file if one does not already exist, and reads in any data that is present in the file.

About

This Java project is designed to handle YAML (.yml) files without the use of an external API. It uses the built-in Java libraries to read, parse and manipulate YAML data, providing developers with a lightweight and efficient solution for working with YAML files in their Java applications.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages