Apache Commons logo Commons VFS

Commons Virtual File System

Commons VFS provides a single API for accessing various different file systems. It presents a uniform view of the files from various different sources, such as the files on local disk, on an HTTP server, or inside a Zip archive.

Some of the features of Commons VFS are:

  • A single consistent API for accessing files of different types.
  • Support for numerous file system types .
  • Caching of file information. Caches information in-JVM, and optionally can cache remote file information on the local file system (replicator).
  • Event delivery.
  • Support for logical file systems made up of files from various different file systems.
  • Utilities for integrating Commons VFS into applications, such as a VFS-aware ClassLoader and URLStreamHandlerFactory.
  • A set of VFS-enabledAnt tasks.

Requirements

Many of the file systems require that optional components be present in order for the protocol to be enabled. See the download and build page for information on the optional dependencies.

Apache Commons VFS Version Java Version
2.9.0 8
2.8.0 8
2.7.0 8
2.6.0 8
2.5.0 8
2.4.x 8
2.3 8
2.2 7
2.1 6
2.0 5
1.0 1.3

News

Apache Commons VFS 2.5.0 is a new features and bug fix release. Version 2.5.0 adds the modules commons-vfs2-jackrabbit1 and commons-vfs2-jackrabbit2. The module commons-vfs2-jackrabbit1 contains WebDAV classes previously delivered in commons-vfs2

Apache Commons VFS 2.4.1 is a bug fix release.

Apache Commons VFS 2.4 is a new features and bug fix release.

Apache Commons VFS 2.3 is a new features and bug fix release.

Apache Commons VFS 2.2 is a new features and bug fix release.

Apache Commons VFS 2.1 is a bugfix release to VFS 2.0. If you meet the requirements you should be able to replace 2.0 with 2.1 without the need for changes to API consumers. VFS 2.1 has introduced some now methods for provider interfaces (like FileObject). If you implement a VFS provider and use the corresponding Abstract* or Default* classes, there should be no need to modify the code or recompile the provider. The TarFileProvider is one known exception to compatibility with 2.0. See the Release Notes and the Clirr Report for details. VFS 2.1 adds a new read-only provider for the Apache Hadoop (HDFS) File system.

Apache Commons VFS 2.0 adds support for FTPS and WebDav have been added in addition to many bugs being fixed. Version 2.0 is not binary compatible with version 1.0. To insure that both 1.0 and 2.0 can coexist version 2.0 has had its Maven groupId changed to org.apache.commons, its Maven artifact changed to commons-vfs2, and the package names are now org.apache.commons.vfs2. The API changes are fairly minor and will mostly impact provider implementations.