Class VFS
java.lang.Object
org.apache.commons.vfs2.VFS
The main entry point for the VFS. Used to create
FileSystemManager instances.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static FileSystemManagerThe FileSystemManagerprivate static BooleanThe URI style -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclose()Closes the defaultFileSystemManagerinstance.private static FileSystemManagercreateFileSystemManager(String managerClassName) Creates a file system manager instance.static FileSystemManagerReturns the defaultFileSystemManagerinstance.static booleanstatic FileSystemManagerreset()Resets the FileSystemManager to the default.static voidsetManager(FileSystemManager manager) Sets the file system managerstatic voidsetUriStyle(boolean uriStyle)
-
Field Details
-
instance
The FileSystemManager -
uriStyle
The URI style
-
-
Constructor Details
-
VFS
private VFS()
-
-
Method Details
-
close
public static void close()Closes the defaultFileSystemManagerinstance.Warning, if you close the default instance, a new one will be created by
getManager().- Since:
- 2.8.0
-
createFileSystemManager
private static FileSystemManager createFileSystemManager(String managerClassName) throws FileSystemException Creates a file system manager instance.- Parameters:
managerClassName- The specific manager implementation class name.- Returns:
- The FileSystemManager.
- Throws:
FileSystemException- if an error occurs creating the manager.
-
getManager
Returns the defaultFileSystemManagerinstance.Warning, if you close this instance you may affect all current and future users of this manager singleton.
- Returns:
- The FileSystemManager.
- Throws:
FileSystemException- if an error occurs creating the manager.
-
isUriStyle
public static boolean isUriStyle() -
reset
Resets the FileSystemManager to the default.- Returns:
- the new FileSystemManager.
- Throws:
FileSystemException- if an error occurs creating the manager.- Since:
- 2.5.0
-
setManager
Sets the file system manager- Parameters:
manager- the file system manager- Since:
- 2.2
-
setUriStyle
public static void setUriStyle(boolean uriStyle)
-