Interface FileSystemManager

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
DefaultFileSystemManager, StandardFileSystemManager

public interface FileSystemManager extends AutoCloseable
A FileSystemManager manages a set of file systems. This interface is used to locate a FileObject by name from one of those file systems.

To locate a FileObject, use one of the resolveFile() methods.

File Naming

A file system manager can recognize several types of file names:

  • Absolute URI. These must start with a scheme, such as file: or ftp:, followed by a scheme dependent file name. Some examples: file:/c:/somefile or ftp://somewhere.org/somefile.
  • Absolute local file name. For example, /home/someuser/a-file or c:\dir\somefile.html. Elements in the name can be separated using any of the following characters: /, \, or the native file separator character. For example, the following file names are the same: c:\somedir\somefile.xml and c:/somedir/somefile.xml.
  • Relative path. For example: ../somefile or somedir/file.txt. The file system manager resolves relative paths against its base file. Elements in the relative path can be separated using /, \, or file system specific separator characters. Relative paths may also contain .. and . elements. See FileObject.resolveFile(java.lang.String) for more details.