I couldn't get it as well before since I always was getting
UrlFileProvider. After I looked on the code I see that providers.xml
contains
<provider
class-name="org.apache.commons.vfs.provider.ftp.FtpFileProvider">
<scheme name="ftp"/>
<if-available class-name="org.apache.commons.net.ftp.FTPFile"/>
</provider>
That means org.apache.commons.net.ftp.FTPFile should be in your
classpath. After I added the corresponding library it works.
Best regards,
Juri.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of James Carman
Sent: Thursday, November 29, 2007 3:53 AM
To: Jakarta Commons Users List
Subject: [vfs] FTP File is Not a File?
I accidentally posted this on the dev list earlier. I meant to send
it to [EMAIL PROTECTED] Sorry for cross-posting.
Can someone else try this out, please? I don't know what's going on
here. I can access the file by pasting the URL into my browser(s) and
via a text-based FTP client, but I can't get Java to download it. I
tried using URL objects and that doesn't work either. I figured VFS
would be able to handle it:
FileSystemManager fsm = VFS.getManager();
FileObject fo =
fsm.resolveFile("ftp://rgd.mcw.edu/pub/data_release/README.txt");
fo.getContent();
If anyone has any ideas, please let me know. Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]