Project icon

com.io7m.jade

Build status Maven Central Codacy Codecov

The jade package provides an API for practicing good etiquette with regards to application data directories.

Contents

Features

  • API for handling application data directories
  • Implements the XDG Basedir specification on Unix-like platforms.
  • Implements best-practice directory management on Windows platforms.
  • Support for portable applications.
  • Fully documented (JavaDoc)
  • OSGi-ready
  • JPMS-ready
  • ISC license
  • High-coverage automated test suite

Releases

The current release is 1.0.1.

Source code and binaries are available from the repository.

Documentation

Documentation for the 1.0.1 release is available for reading online.

Documentation for current and older releases is archived in the repository.

User documentation

Modules

Applications use jade via the com.io7m.jade.api module, but should also have the com.io7m.jade.vanilla module on the class/module path. If the com.io7m.jade.vanilla module is not available, the jade package will unconditionally return paths equivalent those returned by portable mode.

Using Directories

The jade package selects a set of application paths based on the current operating system and the given configuration information. Getting access to the basic set of application directories for an application named Widget is straightforward:

Portable Mode

Applications, particularly on Windows, often want to run in portable mode. Portable mode essentially means that all of the paths used by the application are given relative to the initial working directory of the application. This is typically used to facilitate running applications from removable USB storage devices without saving any data to the host operating system storage.

The jade API allows for specifying the name of a system property that will be consulted in order to determine if the application wants to run in portable mode. If the named system property has a value parsed as true, the API will return paths relative to the application rather than system-specific paths.

Override

The jade API allows for specifying the name of a system property that will be consulted in order to determine if the application wants to override the directory used to calculate application directories. If the named system property exists, the value of the property will be treated as a path, and all application directories will be calculated relative to this path.

JavaDoc

API documentation

Maven

The following is a complete list of the project's modules expressed as Maven dependencies:

<dependency>
  <groupId>com.io7m.jade</groupId>
  <artifactId>com.io7m.jade</artifactId>
  <version>1.0.1</version>
</dependency>

<dependency>
  <groupId>com.io7m.jade</groupId>
  <artifactId>com.io7m.jade.api</artifactId>
  <version>1.0.1</version>
</dependency>

<dependency>
  <groupId>com.io7m.jade</groupId>
  <artifactId>com.io7m.jade.tests</artifactId>
  <version>1.0.1</version>
</dependency>

<dependency>
  <groupId>com.io7m.jade</groupId>
  <artifactId>com.io7m.jade.spi</artifactId>
  <version>1.0.1</version>
</dependency>

<dependency>
  <groupId>com.io7m.jade</groupId>
  <artifactId>com.io7m.jade.vanilla</artifactId>
  <version>1.0.1</version>
</dependency>

<dependency>
  <groupId>com.io7m.jade</groupId>
  <artifactId>com.io7m.jade.documentation</artifactId>
  <version>1.0.1</version>
</dependency>

Each release of the project is made available on Maven Central within ten minutes of the release announcement.

Changes

Subscribe to the releases atom feed.

2020-04-04 Release: com.io7m.jade 1.0.1
2020-04-04 Change: Use primogenitor 4.0.1 for reproducible builds
2020-04-04 Release: com.io7m.jade 1.0.0
2020-04-04 Change: Initial release

Sources

This project uses Git to manage source code.

Repository: https://github.com/io7m/jade

$ git clone https://github.com/io7m/jade

License

Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.

Bug Tracker

The project uses GitHub Issues to track issues.