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 From: BaseX-Talk basex-talk-bounces@mailman.uni-konstanz.de On Behalf Of Christian Grün Sent: Tuesday, April 16, 2019 6:01 AM To: Fabrice ETANCHAUD fetanchaud@pch.cerfrance.fr Cc: BaseX basex-talk@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.jarhttp://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/FTPhttp://basex.org/modules/ftp/FTP'; ftp:connect('host', 21, 'user', 'pw'), ftp:list('/'), ftp:disconnect()
Cheers Christian