FTP2/SFTP — This component provides access to remote file systems over the FTP and SFTP protocols.
ftp://[username@]hostname[:port]/directoryname[?options] sftp://[username@]hostname[:port]/directoryname[?options] ftps://[username@]hostname[:port]/directoryname[?options]
Where directoryname represents the underlying directory. Can contain nested folders.
If no username is provided, then
anonymous
login is attempted using no
password. If no port number is
provided, Apache Camel will provide default values according to the
protocol (ftp = 21, sftp = 22, ftps = 21).
This component uses two different libraries for the actual FTP work. FTP and FTPS use Apache Commons Net while SFTP uses JCraft JSCH.
You can append query options to the URI in the following format,
?option=value&option=value&...
The options below are exclusive to the FTP component:
Table 14. FTP URI options
Name | Default | Description |
---|---|---|
username
|
null
| Specifies the username to use to log in to the remote file systen. |
password
|
null
| Specifies the password to use to log in to the remote file system. |
binary
|
false
| Specifies the file transfer mode, BINARY or ASCII. Default
is ASCII (false ). |
disconnect
|
false
| Camel 2.2: Whether or not to disconnect from remote FTP server right after use. Can be used for both consumer and producer. Disconnect will only disconnect the current connection to the FTP server. If you have a consumer which you want to stop, then you need to stop the consumer/route instead. |
localWorkDirectory
|
null
| When consuming, a local work directory can be used to store the remote file content directly in local files, to avoid loading the content into memory. This is beneficial, if you consume a very big remote file and thus can conserve memory. See below for more details. |
passiveMode
|
false
| FTP only: Specifies whether
to use passive mode connections. Default is active mode
{false ). |
securityProtocol
|
TLS
|
FTPS only: Sets the
underlying security protocol. The following values are
defined: |
disableSecureData ChannelDefaults
|
false
| Camel 2.4: FTPS only:
Whether or not to disable using default values for
execPbsz and
execProt when using secure data
transfer. You can set this option to true
if you want to be in absolute full control what the options
execPbsz and
execProt should be used. |
download
|
true
| Camel 2.11: Whether the FTP
consumer should download the file. If this option is set to
false , then the message body will be
null , but the consumer will still
trigger a Camel Exchange
that has details about the file such as file name, file
size, etc. It's just that the file will not be downloaded.
|
streamDownload | false | Camel 2.11: Whether the consumer should download the entire file up front, the default behavior, or if it should pass an InputStream read from the remote resource rather than an in-memory array as the in body of the Camel Exchange. This option is ignored if download is false or is localWorkDirectory is provided. This option is useful for working with large remote files. |
execProt
|
null
|
Camel 2.4: FTPS only:
Will by default use option |
execPbsz
|
null
| Camel 2.4: FTPS only: This
option specifies the buffer size of the secure data channel.
If option useSecureDataChannel has been
enabled and this option has not been explicit set, then
value 0 is used. |
isImplicit
|
false
| FTPS only: Sets the
security mode(implicit/explicit). Default is explicit
(false ). |
knownHostsFile
|
null
| SFTP only: Sets the
known_hosts file, so that the SFTP
endpoint can do host key verification. |
knownHostsUri
|
null
| SFTP only:Camel 2.11.1: Sets the
known_hosts file (loaded from
classpath by default), so that the SFTP endpoint can do host
key verification. |
keyPair
|
null
| SFTP only:Camel 2.12.0: Sets the Java KeyPair for SSH public key authentication, it supports DSA or RSA keys. |
privateKeyFile
|
null
| SFTP only: Set the private key file to that the SFTP endpoint can do private key verification. |
privateKeyUri
|
null
| SFTP only:Camel 2.11.1: Set the private key file (loaded from classpath by default) to that the SFTP endpoint can do private key verification. |
privateKey
|
null
| SFTP only:Camel 2.11.1: Set the private key as byte[] to that the SFTP endpoint can do private key verification. |
privateKeyFilePassphrase
|
null
| SFTP only: Set the private key file passphrase to that the SFTP endpoint can do private key verification. |
privateKeyPassphrase
|
null
| SFTP only:Camel 2.11.1: Set the private key file passphrase to that the SFTP endpoint can do private key verification. |
preferredAuthentications
|
null
| SFTP only:Camel 2.10.7, 2.11.2,2.12.0: set the preferred authentications which SFTP endpoint will used. Some example include:password,publickey. If not specified the default list from JSCH will be used. |
ciphers
|
null
| Camel 2.8.2, 2.9: SFTP only Set a comma separated list of ciphers that will be used in order of preference. Possible cipher names are defined by JCraft JSCH. Some examples include: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc. If not specified the default list from JSCH will be used. |
fastExistsCheck
|
false
| Camel 2.8.2, 2.9: If set this option to be true, camel-ftp will use the list file directly to check if the file exists. Since some FTP server may not support to list the file directly, if the option is false, camel-ftp will use the old way to list the directory and check if the file exists. From Camel 2.10.1 onwards, this option
also influences |
strictHostKeyChecking
|
no
| SFTP only:Camel 2.2: Sets whether
to use strict host key checking. Possible values
are: In Camel 2.1 and below, the default is
|
maximumReconnectAttempts
| 3 | Specifies the maximum reconnect attempts Apache Camel performs when it tries to connect to the remote FTP server. Use 0 to disable this behavior. |
reconnectDelay
| 1000 | Specifies the delay, in ms, Apache Camel waits before attempting a reconnect. |
connectTimeout
|
10000
| Camel 2.4: Specifies the
connect timeout in ms. This corresponds to using
ftpClient.connectTimeout for
the FTP/FTPS. For SFTP this option is also used when
attempting to connect. |
soTimeout
|
null
| FTP and FTPS
Only:Camel
2.4: Specifies the
SocketOptions.SO_TIMEOUT
value in ms. Note that SFTP automatically uses the
connectTimeout as the
soTimeout . |
timeout
|
30000
| FTP and FTPS
Only:Camel
2.4: Specifies the data timeout in
ms. This corresponds to using
ftpClient.dataTimeout for the
FTP/FTPS. For SFTP, there is no data timeout. |
throwExceptionOn ConnectFailed
|
false
| Camel 2.5: Whether or not
to thrown an exception if a successful connection and login
could not be establish. This allows a custom
pollStrategy to deal with the
exception, for example to stop the consumer or the likes.
|
siteCommand
|
null
| FTP and FTPS Only:Camel 2.5: To execute site
commands after successful login. Multiple site commands can
be separated using a new line character (\n). Use
help site to see which site commands
your FTP server supports. |
stepwise
|
true
| When consuming directories, specifies whether to use stepwise mode for traversing the directory tree. Stepwise means that it will CD one directory at a time. For more details, see Stepwise changing directories. |
separator
|
Auto
| Camel 2.6: Dictates the
path separator char to use when
uploading files. Auto uses the
path provided without alteration.
UNIX uses UNIX style path
separators. Windows uses Windows
style path separators. |
chmod
|
null
| SFTP Producer Only.
Camel 2.9:
Allows you to set chmod on the stored file. For
example chmod=640 . |
compression
| 0 | SFTP Only. Camel 2.8.3/2.9: To use compression. Specify a level from 1 to 10. Important: You must manually add the needed JSCH zlib JAR to the classpath for compression support. |
ftpClient
|
null
| FTP and FTPS Only:Camel 2.1: Allows you to use a
custom
org.apache.commons.net.ftp.FTPClient
instance. |
ftpClientConfig
|
null
| FTP and FTPS Only:Camel 2.1: Allows you to use a
custom
org.apache.commons.net.ftp.FTPClientConfig
instance. |
serverAliveInterval
|
0
| SFTP Only:Camel 2.8 Allows you to set the serverAliveInterval of the sftp session |
serverAliveCountMax
|
1
| SFTP Only:Camel 2.8 Allows you to set the serverAliveCountMax of the sftp session |
ftpClient.trustStore.file
|
null
| FTPS Only: Sets the trust store file, so that the FTPS client can look up for trusted certificates. |
ftpClient.trustStore.type
|
JKS
| FTPS Only: Sets the trust store type. |
ftpClient.trustStore.algorithm
|
SunX509
| FTPS Only: Sets the trust store algorithm. |
ftpClient.trustStore.password
|
null
| FTPS Only: Sets the trust store password. |
ftpClient.keyStore.file
|
null
| FTPS Only: Sets the key store file, so that the FTPS client can look up for the private certificate. |
ftpClient.keyStore.type
|
JKS
| FTPS Only: Sets the key store type. |
ftpClient.keyStore.algorithm
|
SunX509
| FTPS Only: Sets the key store algorithm. |
ftpClient.keyStore.password
|
null
| FTPS Only: Sets the key store password. |
ftpClient.keyStore.keyPassword
|
null
| FTPS Only: Sets the private key password. |
sslContextParameters
|
null
| FTPS Only:Camel 2.9: Reference to a
org.apache.camel.util.jsse.SSLContextParameters
in the Registry. This reference overrides any
configured SSL related options on ftpClient as well
as the securityProtocol (SSL, TLS, etc.) set on
FtpsConfiguration. See Using the
JSSE Configuration Utility. |
proxy
|
null
| SFTP Only:Camel 2.10.7, 2.11.1:
Reference to a
com.jcraft.jsch.Proxy in the
Registry. This proxy is used to
consume/send messages from the target SFTP host. |
useList
|
true
| FTP/FTPS Only:Camel 2.12.1: Specifies whether the consumer should use FTP LIST command to retrieve directory listing to see which files exists. When setting this option to |
ignoreFileNotFoundOr PermissionError
|
false
| Camel 2.12.1: Specifies whether the consumer should ignore when a file was attempted to be retrieved but did not exist (for some reason), or failure due insufficient file permission error. |
![]() | Important |
---|---|
When using the When using |
![]() | Note |
---|---|
See File2 for more options, as all the options from File2 are inherited by FTP2. |
You can configure additional options on the
ftpClient
and
ftpClientConfig
from the URI directly by
using the ftpClient.
or
ftpClientConfig.
prefix.
For example to set the setDataTimeout
on the
FTPClient
to 30 seconds you can do:
from("ftp://foo@myserver?password=secret&ftpClient.dataTimeout=30000") .to("bean:foo");
You can mix and match and have use both prefixes, for example to configure date format or timezones.
from("ftp://foo@myserver?password=secret&ftpClient.dataTimeout=30000&ftpClientConfig.serverLanguageCode=fr") .to("bean:foo");
You can have as many of these options as you like.
See the documentation for the Apache Commons FTP FTPClientConfig for possible options and more details. Also see Apache Commons FTP FTPClient.
If you do not like having many and long configuration in the url
you can refer to the ftpClient
or
ftpClientConfig
to use by letting Camel
lookup in the Registry for
it.
For example:
<bean id="myConfig" class="org.apache.commons.net.ftp.FTPClientConfig"> <property name="lenientFutureDates" value="true"/> <property name="serverLanguageCode" value="fr"/> </bean>
And then let Camel lookup this bean when you use the # notation in the url.
from("ftp://foo@myserver?password=secret&ftpClientConfig=#myConfig").to("bean:foo");
Here are some examples of FTP endpoint URIs:
ftp://someone@someftpserver.com/public/upload/images/holiday2008?password=secret&binary=true ftp://someoneelse@someotherftpserver.co.uk:12049/reports/2008/password=secret&binary=false ftp://publicftpserver.com/download
![]() | Warning |
---|---|
The FTP consumer (with the same endpoint) does not support concurrency (the backing FTP client is not thread safe). You can use multiple FTP consumers to poll from different endpoints. It is only a single endpoint that does not support concurrent consumers. The FTP producer does not have this issue, it supports concurrency. |
![]() | Note |
---|---|
This component is an extension of the File2 component. So there are more samples and details on the File2 component page. |
The FTP consumer, by default, leaves the consumed files untouched
on the remote FTP server. You have to configure it explicitly to
delete the files or move them to another location. For example, you
can use delete=true
to delete the files or
move=.done
to move the files into a hidden
done subdirectory.
The regular File consumer is different as it, by default, moves
files to a .camel
sub directory. The reason that
Camel, by default, does not do this
for the FTP consumer is that it may lack permissions to move or to
delete files.
The option readLock can be used to force Apache Camel not to consume files that are currently in the process of being written. However, this option is turned off by default, as it requires that the user has write access. There are other solutions to avoid consuming files that are currently being written over FTP; for instance, you can write to a temporary destination and move the file after it has been written.
The ftp producer does not support appending to existing files. Any existing files on the remote server will be deleted before the file is written.
The following message headers can be used to affect the behavior of the component
Table 15. Component message headers
Header | Description |
---|---|
CamelFileName
| Specifies the output file name (relative to the endpoint directory) to be used for the output message when sending to the endpoint. If this is not present and no expression either, then a generated message ID is used as the filename instead. |
CamelFileNameProduced
| The actual absolute filepath (path + name) for the output file that was written. This header is set by Apache Camel and its purpose is providing end-users the name of the file that was written. |
CamelFileBatchIndex
| Current index out of total number of files being consumed in this batch. |
CamelFileBatchSize
| Total number of files being consumed in this batch. |
CamelFileHost
| The remote hostname. |
CamelFileLocalWorkPath
| Path to the local work file, if local work directory is used. |
In addition, the FTP/FTPS consumer and producer will enrich the
Camel Message
with the following headers:
Table 16. Produce and Consumer headers
Header | Description |
---|---|
CamelFtpReplyCode
| Camel 2.11.1: The FTP client reply code (the type is a integer) |
CamelFtpReplyString
| Camel 2.11.1: The FTP client reply string |
The two sets of libraries (see above) have different APIs for
setting the timeout. You can use the
connectTimeout
option for both of them to set
a timeout in milliseconds to establish a network connection. An
individual soTimeout
can also be set on the
FTP/FTPS, which corresponds to using
ftpClient.soTimeout
. Notice SFTP will
automatically use connectTimeout
as its
soTimeout
. The timeout
option only applies for FTP/FTSP as the data timeout, which
corresponds to the ftpClient.dataTimeout
value.
All timeout values are in milliseconds.
Apache Camel supports consuming from remote FTP servers and
downloading the files directly into a local work directory. This
avoids reading the entire remote file content into memory as it is
streamed directly into the local file using
FileOutputStream
.
Apache Camel will store to a local file with the same name as the
remote file, though with .inprogress
as extension
while the file is being downloaded. Afterwards, the file is renamed
to remove the .inprogress
suffix. And finally,
when the Exchange is complete the
local file is deleted.
So if you want to download files from a remote FTP server and store it as files then you need to route to a file endpoint such as:
from("ftp://someone@someserver.com?password=secret&localWorkDirectory=/tmp").to("file://inbox");
![]() | Note |
---|---|
The route above is ultra efficient as it avoids reading the
entire file content into memory. It downloads the remote file
directly to a local file stream. The
|
Camel FTP can operate in two modes in terms of traversing directories when consuming files (for example, downloading) or producing files (for example, uploading):
stepwise
not stepwise
You may want to pick either one depending on your situation and security issues. Some Camel end users can only download files if they use stepwise, while others can only download if they do not. At least you have the choice to pick.
Note that stepwise changing of directory will in most cases only
work when the user is confined to it's home directory and when the
home directory is reported as /
.
The difference between the two of them is best illustrated with an example. Suppose we have the following directory structure on the remote FTP server we need to traverse and download files:
/ /one /one/two /one/two/sub-a /one/two/sub-b
And that we have a file in each of sub-a
(a.txt
) and sub-b
(b.txt
)
folder.
The following log shows the conversation between the FTP endpoint and the remote FTP server when the FTP endpoint is operating in stepwise mode:
TYPE A 200 Type set to A PWD 257 "/" is current directory. CWD one 250 CWD successful. "/one" is current directory. CWD two 250 CWD successful. "/one/two" is current directory. SYST 215 UNIX emulated by FileZilla PORT 127,0,0,1,17,94 200 Port command successful LIST 150 Opening data channel for directory list. 226 Transfer OK CWD sub-a 250 CWD successful. "/one/two/sub-a" is current directory. PORT 127,0,0,1,17,95 200 Port command successful LIST 150 Opening data channel for directory list. 226 Transfer OK CDUP 200 CDUP successful. "/one/two" is current directory. CWD sub-b 250 CWD successful. "/one/two/sub-b" is current directory. PORT 127,0,0,1,17,96 200 Port command successful LIST 150 Opening data channel for directory list. 226 Transfer OK CDUP 200 CDUP successful. "/one/two" is current directory. CWD / 250 CWD successful. "/" is current directory. PWD 257 "/" is current directory. CWD one 250 CWD successful. "/one" is current directory. CWD two 250 CWD successful. "/one/two" is current directory. PORT 127,0,0,1,17,97 200 Port command successful RETR foo.txt 150 Opening data channel for file transfer. 226 Transfer OK CWD / 250 CWD successful. "/" is current directory. PWD 257 "/" is current directory. CWD one 250 CWD successful. "/one" is current directory. CWD two 250 CWD successful. "/one/two" is current directory. CWD sub-a 250 CWD successful. "/one/two/sub-a" is current directory. PORT 127,0,0,1,17,98 200 Port command successful RETR a.txt 150 Opening data channel for file transfer. 226 Transfer OK CWD / 250 CWD successful. "/" is current directory. PWD 257 "/" is current directory. CWD one 250 CWD successful. "/one" is current directory. CWD two 250 CWD successful. "/one/two" is current directory. CWD sub-b 250 CWD successful. "/one/two/sub-b" is current directory. PORT 127,0,0,1,17,99 200 Port command successful RETR b.txt 150 Opening data channel for file transfer. 226 Transfer OK CWD / 250 CWD successful. "/" is current directory. QUIT 221 Goodbye disconnected.
As you can see when stepwise is enabled, it will traverse the directory structure using CD xxx.
The following log shows the conversation between the FTP endpoint and the remote FTP server when the FTP endpoint is operating in non-stepwise mode:
230 Logged on TYPE A 200 Type set to A SYST 215 UNIX emulated by FileZilla PORT 127,0,0,1,4,122 200 Port command successful LIST one/two 150 Opening data channel for directory list 226 Transfer OK PORT 127,0,0,1,4,123 200 Port command successful LIST one/two/sub-a 150 Opening data channel for directory list 226 Transfer OK PORT 127,0,0,1,4,124 200 Port command successful LIST one/two/sub-b 150 Opening data channel for directory list 226 Transfer OK PORT 127,0,0,1,4,125 200 Port command successful RETR one/two/foo.txt 150 Opening data channel for file transfer. 226 Transfer OK PORT 127,0,0,1,4,126 200 Port command successful RETR one/two/sub-a/a.txt 150 Opening data channel for file transfer. 226 Transfer OK PORT 127,0,0,1,4,127 200 Port command successful RETR one/two/sub-b/b.txt 150 Opening data channel for file transfer. 226 Transfer OK QUIT 221 Goodbye disconnected.
As you can see when not using stepwise, there are no CD operation invoked at all.
In the sample below we set up Apache Camel to download all the reports from the FTP server once every hour (60 min) as BINARY content and store it as files on the local file system.
protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { // we use a delay of 60 minutes (eg. once pr. hour we poll the FTP server long delay = 60 * 60 * 1000L; // from the given FTP server we poll (= download) all the files // from the public/reports folder as BINARY types and store this as files // in a local directory. Apache Camel will use the filenames from the FTPServer // notice that the FTPConsumer properties must be prefixed with "consumer." in the URL // the delay parameter is from the FileConsumer component so we should use consumer.delay as // the URI parameter name. The FTP Component is an extension of the File Component. from("ftp://tiger:scott@localhost/public/reports?binary=true&consumer.delay=" + delay). to("file://target/test-reports"); } }; }
And the route using Spring DSL:
<route> <from uri="ftp://scott@localhost/public/reports?password=tiger&inary=true&elay=60000"/> <to uri="file://target/test-reports"/> </route>
The FTP consumer is built as a scheduled consumer to be used in the from route. However, if you want to start consuming from an FTP server triggered within a route, use a route like the following:
from("seda:start") // set the filename in FILE_NAME header so Apache Camel know the name of the remote file to poll .setHeader(Exchange.FILE_NAME, header("myfile")) .pollEnrich("ftp://admin@localhost:21/getme?password=admin&binary=false") .to("mock:result");
from("ftps://admin@localhost:2222/public/camel?password=admin&securityProtocol=SSL&isImplicit=true &ftpClient.keyStore.file=./src/test/resources/server.jks &ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password") .to("bean:foo");
from("ftps://admin@localhost:2222/public/camel?password=admin&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.password=password") .to("bean:foo");
org.apache.camel.component.file.GenericFileFilter
Apache Camel supports pluggable filtering strategies. You define a
filter strategy by implementing the
org.apache.camel.component.file.GenericFileFilter
interface in Java. You can then configure the endpoint with the
filter to skip certain files.
In the following sample we define a filter that only accepts files
whose filename starts with report
.
public class MyFileFilter<T> implements GenericFileFilter<T> { public boolean accept(GenericFile<T> file) { // we only want report files return file.getFileName().startsWith("report"); } }
And then we can configure our route using the filter attribute to reference our filter
(using #
notation) that we have defined in the
spring XML file:
<!-- define our sorter as a plain spring bean --> <bean id="myFilter" class="com.mycompany.MyFileFilter"/> <route> <from uri="ftp://someuser@someftpserver.com?password=secret&filter=#myFilter"/> <to uri="bean:processInbox"/> </route>
The ANT path matcher is a filter that is shipped out-of-the-box in the camel-spring jar. So you need to depend on camel-spring if you are using Maven. The reason is that we leverage Spring's AntPathMatcher to do the actual matching.
The file paths are matched with the following rules:
?
matches one character
*
matches zero or more
characters
**
matches zero or more directories in
a path
The sample below demonstrates how to use it:
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> <camelContext xmlns="http://camel.apache.org/schema/spring"> <template id="camelTemplate"/> <!-- use myFilter as filter to allow setting ANT paths for which files to scan for --> <endpoint id="myFTPEndpoint" uri="ftp://admin@localhost:${SpringFileAntPathMatcherRemoteFileFilterTest.ftpPort}/antpath?password=admin&ecursive=true&elay=10000&nitialDelay=2000&ilter=#myAntFilter"/> <route> <from ref="myFTPEndpoint"/> <to uri="mock:result"/> </route> </camelContext> <!-- we use the AntPathMatcherRemoteFileFilter to use ant paths for includes and exclude --> <bean id="myAntFilter" class="org.apache.camel.component.file.AntPathMatcherGenericFileFilter"> <!-- include any files in the sub-folder that have day in the name --> <property name="includes" value="**/subfolder/**/*day*"/> <!-- exclude all files with bad in name or .xml files. Use comma to seperate multiple excludes --> <property name="excludes" value="**/*bad*,**/*.xml"/> </bean>
To use an HTTP proxy to connect to your remote host, you can configure your route in the following way:
<!-- define our sorter as a plain spring bean --> <bean id="proxy" class="com.jcraft.jsch.ProxyHTTP"> <constructor-arg value="localhost"/> <constructor-arg value="7777"/> </bean> <route> <from uri="sftp://localhost:9999/root?username=admin&password=admin&proxy=#proxy"/> <to uri="bean:processFile"/> </route>
You can also assign a user name and password to the proxy, if
necessary. Please consult the documentation for
com.jcraft.jsch.Proxy
to discover all
options.
When you want to download a single file and knows the file name,
you can use fileName=myFileName.txt
to tell Camel
the name of the file to download. By default the consumer will still
do a FTP LIST command to do a directory listing and then filter
these files based on the fileName
option. Though
in this use-case it may be desirable to turn off the directory
listing by setting useList=false
. For example the
user account used to login to the FTP server may not have permission
to do a FTP LIST command. So you can turn off this with
useList=false
, and then provide the fixed
name of the file to download with
fileName=myFileName.txt
, then the FTP
consumer can still download the file. If the file for some reason
does not exist, then Camel will by default throw an exception, you
can turn this off and ignore this by setting
ignoreFileNotFoundOrPermissionError=true
.
For example to have a Camel route that pickup a single file, and delete it after use you can do
from("ftp://admin@localhost:21/nolist/?password=admin&stepwise=false&useList=false&ignoreFileNotFoundOrPermissionError=true&fileName=report.txt&delete=true") .to("activemq:queue:report");
Notice that we have use all the options we talked above above.
You can also use this with ConsumerTemplate
.
For example to download a single file (if it exists) and grab the
file content as a String type:
String data = template.retrieveBodyNoWait("ftp://admin@localhost:21/nolist/?password=admin&stepwise=false&useList=false&ignoreFileNotFoundOrPermissionError=true&fileName=report.txt&delete=true", String.class);