commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject Re: [VFS and Net] Dealing with non-standard FTP servers
Date Fri, 17 Sep 2004 18:30:05 GMT
Michael D. Hirsch wrote:

>Another option is to explicitly pass the FQCN for my new parser into 
>DefaultFTPFileEntryParserFactory, but there I'm stymied because, AFAICT, 
>there is no way to pass the FQCN through the vfs layer to the net layer.
You cant pass directly a FTPFileEntryParser, but you can pass your own 
FtpFileEntryParserFactory which in turn can create your FTPFileEntryParser.

        FileSystemOptions fso = new FileSystemOptions();
new YourFtpFileEntryParserFactory());
        FileObject fo = 
VFS.getManager().resolveFile("ftp://to/your/file", fso);
        FileObject fo2 = fo.resolveFile("a_child");
        FileObject fo3 = VFS.getManager().resolveFile("ftp://to/your/file");

In this example the filesystem configuration will be used for the 
objects "fo" and "fo2", but not "fo3" as this will create a new 
filesystem without special options.

Hope this helps. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message