You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by LVXIAOYI <bg...@hotmail.com> on 2011/05/12 12:06:09 UTC

[vfs] the performance of Common VFS.....









Hi,

I use Common VFS to connect to a  FTP server and want to list all sub directorys like below code:

//init FileSystemManager
FileSystemManager fsManager= VFS.getManager();

//init first FileObject, the 'logo ' direcotry has more than 5000 sub-dirctorys 
FileObject dirctory = fsManager.fsManager.resolveFile("ftp://test_user:test_pwd@10.1.3.67:21/opt/yue/product/cmc/logo");

//to list all sub-directorys. Here has a performance problem, the thread is running all the time, not result returned
FileObject[] subDirectorys = dirctory .getChildren();

So,  could anybody give me some advice?

Thanks

Joey