commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael D. Hirsch" <mhir...@nubridges.com>
Subject Re: [VFS and Net] Dealing with non-standard FTP servers
Date Fri, 17 Sep 2004 20:38:28 GMT
On Friday 17 September 2004 02:30 pm, Mario Ivankovits wrote:
> 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();
>
> FtpFileSystemConfigBuilder.getInstance().setFTPFileEntryParserFactory(fso,
> 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.

Indeed.  This might do the trick for me.  I'll give it a whirl and see how it 
works.

Thanks,

Michael

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


Mime
View raw message