[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Using ECF FileTransfer to browse remote file system

Hi Scott,

I created a feature request here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=445729

I'll go ahead and start implementing the pieces that you described below. How do I share that you & the other committers?


----- Original Message -----
From: "Scott Lewis" <slewis@xxxxxxxxxxxxx>
To: ecf-dev@xxxxxxxxxxx
Sent: Tuesday, September 30, 2014 11:28:32 AM
Subject: Re: [ecf-dev] Using ECF FileTransfer to browse remote file system

Hi J,

On 9/29/2014 9:26 PM, J Langley wrote:
> Hello,
> 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: 
implements IRemoteFileSystemBrowserFactory
2) Creating a new class: 
org.eclipse.ecf.internal.provider.scp.ScpBrowseFileTransfer implements 
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 
that's in 

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).


ecf-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit