Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: converted to 1.6 markup

...

No Format
private FileSystemManager fsManager = VFS.getManager();

Wiki Markupthe getManager() method probably returned a \[http://commons.apache.org/vfs/apidocs/org/apache/commons/vfs/impl/StandardFileSystemManager.html StandardFileSystemManager\] which extends the DefaultFileSystemManager class and implements the FileSystemManager interface.unmigrated-wiki-markup

What you are probably after is the \[http://commons.apache.org/vfs/apidocs/org/apache/commons/vfs/impl/DefaultFileSystemManager.html#close() close()\] method of the DefaultFileSystemManager to clean up any temporary files and close all providers. Cast the FileSystemManager to a DefaultFileSystemManager access the close() method like this:

No Format
((DefaultFileSystemManager) fsManager).close();

...