FTP client module
Friday, 12 April 2019 · 3 messages · last reply 17 Apr 2019
FE
Fabrice ETANCHAUD12 Apr 2019 11:44 #
Hi all !
I am happy to get back to basics, after a lot of SQL ;-)
On november 2017, Christian proposed to broadcast a FTP client module to the list, I must have missed the link, I cannot find the module.
Is it still possible to get it ?
Thank you,
Best regards,
Fabrice
CG
Christian Grün16 Apr 2019 12:00 #
Hi Fabrice,
Welcome back!
Quoted text · Fabrice ETANCHAUD · 2 lines
> On november 2017, Christian proposed to broadcast a FTP client module to the list, > I must have missed the link, I cannot find the module.
You can install the repository via the GUI or the REPO command:
repo install http://files.basex.org/modules/org/basex/modules/ftp/FTP.jar
Please note that it’s not properly documented yet, but you can have a look at the Java source file that’s embedded in the archive. Here is a simple example how to list the files of a remote directory:
import module namespace ftp = 'http://basex.org/modules/ftp/FTP';
ftp:connect('host', 21, 'user', 'pw'),
ftp:list('/'),
ftp:disconnect()Cheers
Christian
LV
Lizzi, Vincent17 Apr 2019 18:09 #
Hi Fabrice and Christian,
I recently needed to interact with an SFTP site using BaseX for a project. Initially I tried using the FTP module but it did not meet the needs (although it relies on Apache Commons Net which supports SFTP so it should in theory be possible to extend this module to support SFTP). I created a module that uses WinSCP's scripting capability. This module is available at https://github.com/vincentml/basex-winscp
Cheers,
Vincent
Information Classification: General
Quoted text · BaseX-Talk · 20 lines
From: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> On Behalf Of Christian Grün Sent: Tuesday, April 16, 2019 6:01 AM To: Fabrice ETANCHAUD <fetanchaud at pch.cerfrance.fr> Cc: BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] FTP client module Hi Fabrice, Welcome back! > On november 2017, Christian proposed to broadcast a FTP client module to the list, > I must have missed the link, I cannot find the module. You can install the repository via the GUI or the REPO command: repo install http://files.basex.org/modules/org/basex/modules/ftp/FTP.jar<http://files.basex.org/modules/org/basex/modules/ftp/FTP.jar> Please note that it's not properly documented yet, but you can have a look at the Java source file that's embedded in the archive. Here is a simple example how to list the files of a remote directory: import module namespace ftp = 'http://basex.org/modules/ftp/FTP<http://basex.org/modules/ftp/FTP>'; ftp:connect('host', 21, 'user', 'pw'), ftp:list('/'), ftp:disconnect() Cheers Christian
Written for BaseX 9.1, 9.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery