THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
No Format |
---|
FileObject src = null; <-- In processing(), do your things, including src = children[0] --> public void release() { FileSystem fs = null; this.src.close(); // Seems to still work even if this line is omitted fs = this.src.getFileSystem(); // This works even after the src is closed. this.fsManager.closeFileSystem(fs); } |
I have incorporated Detlev's suggestion into the example above, because the original release method used "((DefaultFileSystemManager) this.fsManager).close();
" which worked once, but if you reinitialize and run the process again you will get an error containing
No Format |
---|
org.apache.commons.vfs.FileSystemException: Unknown scheme "sftp" in URI "sftp://sftpremote.example.com/data/source/fires/smoke/"
|
Detlev's method doesn't have this problem.
Compiling
Compile the source code with
...