[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ecf-dev] Using ECF FileTransfer to browse remote file system
- From: Scott Lewis <slewis@xxxxxxxxxxxxx>
- Date: Tue, 30 Sep 2014 09:28:32 -0700
- Delivered-to: firstname.lastname@example.org
- User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
On 9/29/2014 9:26 PM, J Langley wrote:
I am trying to find a way to list the files on a remote file system. I have implemented and tested the SCP provider for sending and receiving files, but I need a way to browse remote files to retrieve. The only access I have is through an SSH connection. I am contemplating an implementation of the IRemoteFileSystemBrowser interface and using the ScpOutgoingFileTransfer class as a template for opening a channel with JSch.
Just to be clear, the file transfer browse API impl is just missing from
the scp provider...it was simply never added.
What I would suggest is that if you are contemplating adding support for
this API in the scp provider that you open an enhancement request/bug
for ECF, and I and other ECF committers will help with the
implementation/testing. If you are OK with it, it could then be
contributed and become part of future ECF releases. I encourage you to
make such a contribution...in return I will personally guarantee
assistance/help with the implementation.
Unless of course, someone has already done this?
Any thoughts on whether or not this is the right way to go?
My starting suggestion (lots more details on bug of course) would be
model things off of the structure of things already implemented in the
httpclient4 provider. This provider is located here in the git repository:
For example, see this class:
This class is registered as an extension via the
extension point in the httpclient4 provider's plugin.xml.
Similarly, we can enhance the scp provider by:
1) Creating a new class:
2) Creating a new class:
3) Implement IRemoteFileSystemBrowserFactory.newInstance() that returns
a new instance of ScpBrowseFileTransfer
4) Implement ScpBrowseFileTransfer. Possibly using
as superclass to make it easier to implement. This class will contain
the actual scp calls to browse the remote file system.
5) Register your ScpBrowseFileTransferFactory as an extension via the
browseFileTransferProtocolFactory extension point.
Like I mention above, the httpclient4 provider does 1-5 above for
http/https. Another example of an impl of IRemoteFileSystemBrowser is
the local file system provider...i.e. urls that start with 'file:'...and
Anyway, please open an enhancement request and I expect we can jointly
implement this addition to the scp provider quickly and
easily...assuming the com.jcraft.jsch library provides the necessary
support for browsing the remote file system (as I believe it does, but
haven't looked at in a while).