About TrueZIP Path

This module provides the TPath class for simple, uniform, transparent, thread-safe, read/write access to archive files as if they were virtual directories in a file system path. It also provides the TFileSystemProvider class to implement a file system provider for the NIO.2 API (JSR 203) in JSE 7.

This is the primary API for JSE 7 compliant TrueZIP applications: Like the API of the module TrueZIP File*, this API is just a facade for the module TrueZIP Kernel. In contrast to the TrueZIP File* API however, this API can access any (virtual) file system, not just the platform file system and any archive files within the platform file system. In contrast to the TrueZIP Kernel API, both APIs are designed to be easy to learn and convenient to use while providing a great level of flexibility. Because all virtual file system state is managed by the TrueZIP Kernel module, this module can concurrently access the same file systems than the TrueZIP File* module.

For example, an application could access an entry within an archive file which is located at a web site using a TPath like this:

Path path = new TPath(new URI("http://acme.com/download/everything.tar.gz/README.TXT"));
try (InputStream in = Files.newInputStream(path)) {
    // Read archive entry contents here.

This example presumes that the JARs of the driver modules TrueZIP Driver HTTP(S) and TrueZIP Driver TAR are present on the run time class path.

For more examples, please use the Maven archetype for TrueZIP Path module applications as described in the Kick-Starting TrueZIP section. You might also want to download the source code of the TrueZIP Samples module.

For the API documentation, please refer to the Javadoc of the package de.schlichtherle.truezip.nio.file