TrueVFS is a virtual file system (VFS) for Java 7 which enables client applications to perform CRUD (Create, Read, Update, Delete) operations on archive files as if they were virtual directories, even with nested archive files in multithreaded environments - see Key Features. For example, creating a TAR.GZ file from a ZIP file is as easy as calling:

new TFile("archive.zip").cp_rp(new TFile("archive.tar.gz"));

The semantics of this example are roughly equivalent to the GNU command...

cp -rp archive.zip archive.tar.gz

... if only the cp command would let you access ZIP files and TAR.GZ files as if they were directories.

Note that the high abstraction level of the client API enables optimization of I/O access, so that this example operation doesn't even require buffering to temporary files.

TrueVFS is Open Source Software and is covered by the Eclipse Public License, Version 1.0. The most recent version is TrueVFS 0.10.6 - see Change Log.

State Of Affairs

TrueVFS is the successor of TrueZIP. TrueVFS 0.10.6 has been developed by refactoring the TrueZIP code base and reflects the latest changes up to TrueZIP 7.7.6. While refactoring, the original automated test suite has been maintained and extended so that you can easily put the same faith into TrueVFS 0.10.6 than you could put into TrueZIP 7.7.6.

If you are interested in the plans for this project, please have a look at its Road Map on JIRA or subscribe to its Users Mailing List for discussion. As of now, TrueVFS and TrueZIP share the same mailing lists, so if you are already subscribed to any TrueZIP mailing list, then you don’t need to change anything.

Note that the TrueVFS version is not yet at 1.0 because chances are that there will be backwards incompatible changes to the API of internal modules. This is unlikely to happen to the API of the client module TrueVFS Access, however.

Developing TrueVFS is a serious effort which requires a lot of time. If TrueVFS has helped you or your organization to save some valuable development time or enable new features in your application, then please consider making a donation. To make a donation, just click the Donate button in the navigation bar on the left side or contact me personally. Any donation contributes to the ongoing development and support of the TrueVFS project. Thank you very much for your consideration!

Supported File System Types

TrueVFS 0.10.6 ships with pluggable driver modules for FILE, HTTP(S), JAR, ODF, SFX, TAR, TAR.BZIP2, TAR.GZIP, TAR.XZ, ZIP and ZIP.RAES (TZP) file system schemes. For the 1.0 release, there will be more.

Simply add the JAR artifact of these driver modules to the run time class path to make their file system drivers available for service location in the client API module - see below.

Using TrueVFS

As a library, TrueVFS provides simple, uniform, transparent, thread-safe, read/write access to archive files as if they were virtual directories in a file system path. TrueVFS provides the client module TrueVFS Access with the API for convenient access to its (federated virtual) file system space.

Writing an application for this API is really simple: Please have a look at the page Getting Started to learn how to generate a TrueVFS client application from a Maven archetype in about ten minutes or have a look at the tutorial.

Extending TrueVFS

As a framework, TrueVFS provides the API to write file system drivers which plug-in to its federated file system space. The module TrueVFS Kernel modules features federating, multithreading, multiplexing, caching and accounting so that (archive) file system drivers do not need to take care of these aspects of a (virtual) file system.

While there is no tutorial for how to write a file system driver, there's comprehensive Javadoc and sample code:

  • If you are going to write an archive file system driver, please consult the Javadoc for the abstract class FsArchiveDriver.
  • If you are going to write a plain file system driver, please consult the Javadoc for the abstract class FsDriver.