[EMAIL PROTECTED] wrote:
 I'm trying to automate the downloading of data from a remote SFTP
server using VFS. My program gets the files, but doesn't exit, it seems
to hang. It's not clear what cleanup steps I should be doing after
accessing files. I haven't found any VFS + SFTP examples or tutorials.
Sorry for the double posting, delivery errors and a failure of email filters made it look like the original post didn't go through.

I did discover a solution though: one needs to cast the FileSystemManager to the DefaultFileSystemManager which then gives access to a no-argument close() method that does what I need. My release method from the sample code now works as:


   public void release() {
       ((DefaultFileSystemManager) this.fsManager).close();
   } // release()


See http://commons.apache.org/vfs/apidocs/org/apache/commons/vfs/impl/DefaultFileSystemManager.html#close()

Thanks to a posting at http://osdir.com/ml/jakarta.commons.user/2003-11/msg00079.html by Morus Walter for cluing me in.

-Ken

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to