com.mule.modules

ftp-lite-connector

config

Namespacehttp://www.mulesoft.org/schema/mule/ftplite
Schema Locationhttp://www.mulesoft.org/schema/mule/ftplite/current/mule-ftplite.xsd  (View Schema)
Schema Version1.0
Minimum Mule Version3.4

Module Overview

FTP Light connector. It takes credentials in all calls. Opens and closes a connection on each call to the server. If you need a persistent connection to an FTP server, you would be better served by using the FTP transport in Mule.

Summary

Configuration
<ftplite:config>
Configure an instance of this module
Message Processors
<ftplite:get-file>
Get a single file's information.
<ftplite:get-file-content>
Get a single file's content as a stream
<ftplite:get-folder>
Get all folder and files in a Path, it defaults to "/" when path is null
<ftplite:upload-stream>
Get a single file's content as a stream

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ftplite="http://www.mulesoft.org/schema/mule/ftplite"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/ftplite
               http://www.mulesoft.org/schema/mule/ftplite/current/mule-ftplite.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

Message Processors

<ftplite:get-file>

Get a single file's information. filePath must be the full file's path

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
hostName The FTP host's name to connect to String */* UTF-8
userName The user name to use to login String */* UTF-8
password The password to use to login String */* UTF-8
port 21 Optional. The port the FTP service is listening on String */* UTF-8
filePath The path to the folder to list String */* UTF-8
passive true Optional. Use passive mode on the connection String */* UTF-8
Returns
Return Type Description
FTPFile an FTPFile entry with the file's information
Exception Payloads
Payload ClassDescription
FtpLiteException when there is IO error in the FTP connection

<ftplite:get-file-content>

Get a single file's content as a stream

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
hostName The FTP host's name to connect to String */* UTF-8
userName The user name to use to login String */* UTF-8
password The password to use to login String */* UTF-8
port 21 Optional. The port the FTP service is listening on String */* UTF-8
filePath The path to the folder to list String */* UTF-8
passive true Optional. Use passive mode on the connection String */* UTF-8
Returns
Return Type Description
InputStream an FTPFile entry with the file's information
Exception Payloads
Payload ClassDescription
FtpLiteException when there is an error in the FTP connection

<ftplite:get-folder>

Get all folder and files in a Path, it defaults to "/" when path is null

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
hostName The FTP host's name to connect to String */* UTF-8
userName The user name to use to login String */* UTF-8
password The password to use to login String */* UTF-8
port 21 Optional. The port the FTP service is listening on String */* UTF-8
path / Optional. The path to the folder to list String */* UTF-8
passive true Optional. Use passive mode on the connection String */* UTF-8
Returns
Return Type Description
FTPFile[] an array of FTPFile's in the path specified
Exception Payloads
Payload ClassDescription
FtpLiteException when there is an error in the FTP connection

<ftplite:upload-stream>

Get a single file's content as a stream

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
hostName The FTP host's name to connect to String */* UTF-8
userName The user name to use to login String */* UTF-8
password The password to use to login String */* UTF-8
port 21 Optional. The port the FTP service is listening on String */* UTF-8
filePath The path to the folder to store the file in String */* UTF-8
fileName The name of the file to store String */* UTF-8
content #[payload] Optional. An InputStream with the content to store in the file InputStream */*
passive true Optional. Use passive mode on the connection String */* UTF-8
Returns
Return Type Description
FTPFile an FTPFile entry with the file's information
Exception Payloads
Payload ClassDescription
FtpLiteException when there is an error in the FTP connection

Message Sources

Transformers