commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Artamonov, Juri" <jartamo...@fusionone.com>
Subject RE: [vfs] FTP File is Not a File?
Date Thu, 29 Nov 2007 08:47:42 GMT
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: jcarman@carmanconsulting.com [mailto:jcarman@carmanconsulting.com]
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 user@.  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: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message