/exoad4j

General folder that all of my projects use to store user data

Primary LanguageJavaBSD 4-Clause "Original" or "Old" LicenseBSD-4-Clause

exoad4j

Gradle build

exoad4j is a library for me to unify all the save locations for my projects

Copyright (C) Jack Meng (exoad) 2023

Caution

I highly suggest you do not use this tool directly! Modify it in someway so you do not clash with my projects unless it is for a plugin!

Motive

This project was primarily designed for managing multiple personal projects.

Developing desktop applications often involves the need to save data. However, managing data becomes challenging when dealing with multiple projects, each requiring its own set of saved data. This library aims to address this issue.

The solution involves creating a centralized folder and establishing subfolders to represent individual projects. This approach streamlines the data-saving process for each project, reducing complexity.

Usage

Check on GitHub Packages: https://github.com/exoad/exoad4j/packages/

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("pkg.exoad:exoad4j:1.1.2")
}

Maven

 <dependency>
  <groupId>pkg.exoad</groupId>
  <artifactId>exoad4j</artifactId>
  <version>1.1.2</version>
</dependency> 

Example

Creating a registry for a new application

import pkg.exoad.distrib.DistribFolder;
import pkg.exoad.distrib.Exoad;

public class MyNewApplication
{
	public static void main(String... args)
	{
		Exoad.arm();
		Exoad.putRegistry(
				"MyNewApplication",
				Exoad.registerProgram(new DistribFolder("astralascent"))
		);
        }
}

Writing to a file under that registry

Exoad.getRegistry("MyNewApplication").writeToFile("Hello World!", "test.txt");