commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance Semmens" <lance.semm...@swebtec.com>
Subject [VFS] FTP file copy hangs part 2
Date Thu, 24 Nov 2005 17:29:26 GMT
Im copying a large set of files from an FTP site to a UNC path.
Occasionally, the file copy hangs... most of the time the file copy
works. 

I am using passive FTP mode.
I can get success and fail using the same file set.

Here's the code
		FileSystemManager fsManager = VFS.getManager();
		FileSystemOptions options = new FileSystemOptions();
	
FtpFileSystemConfigBuilder.getInstance().setPassiveMode(options, true);
		FileObject fromFile = fsManager.resolveFile(fromUrl,
options);
		FileObject toFile = fsManager.resolveFile(toUrl,
options);
		toFile.createFolder();
		toFile.copyFrom(fromFile, new AllFileSelector());
________________________
Lance Semmens
Software Engineer

Swebtec
12 Hurlingham Business Park
Sulivan Road
London SW6 3DU
Tel: 0207 471 8121
Fax: 0207 471 8151
www.swebtec.com <http://www.swebtec.com/>  



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message