META-INF.mule-file.xsd Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mule-transport-file Show documentation
Show all versions of mule-transport-file Show documentation
A Mule transport for File Connectivity. This transport allows files to be read and written to
directories on the local file system. The transport can be configured to filter the file it reads and
the way files are written, such as whether binary output is used or the file is appended to.
This controls the mapping from filename patterns to filenames.
Is requires an implementation of the FilenameParser interface,
which is used to control how filename patterns are used to generate file names.
The directory path where the file should be written on dispatch.
This path is usually set as the endpoint of the dispatch event,
however this allows you to explicitly force a single directory for the connector.
The directory path where the file should be read from.
This path is usually set as the inbound endpoint,
however this allows you to explicitly force a single directory for the connector.
By default, when a file is received it is read into a String or byte[].
The file is moved if the moveToDirectory is set, otherwise it is deleted.
To access the File object set this property to false and specify a
NoActionTransformer transformer for the connector.
Mule will not delete the file, so it's up to the component to delete it
when it's done.
If the moveToDirectory is set, the file is first moved, then the
File object of the moved file is passed to the component.
It is recommended that a moveToDirectory is specified when turning autoDelete off.
Should output append to existing file?
Determines whether objects should be serialized to the file or not.
If not the raw bytes or text is written.
Should a FileInputStream be sent as the message payload or a File?
The frequency in milliseconds that the read directory should be checked.
Note that the read directory is specified by the endpoint of the listening component.
Miniumum age (ms) for a file to be processed.
The pattern to use when moving a read file to an new location determined by the
moveToDirectory property.
This can use the patterns supported by the filename-parser configured for this connector
The directory path where the file should be written once it has been read.
If this is not set the file read is deleted.
Sort incoming files using this comparator.
The class must implement java.util.Comparator interface.
Should comparator order be reversed?
The pattern to use when writing a file to disk.
This can use the patterns supported by the filename-parser configured for this connector
A file location.
The file connector uses this as a default implementation, it understands the following patterns:
- ${DATE} - the current date in the format dd-MM-yy_HH-mm-ss.SS;
- ${DATE:yy-MM-dd} - the current date using the specified format;
- ${SYSTIME} - The current system time milliseconds;
- ${UUID} - A generated Universally unique id;
- ${ORIGINALNAME} - The original file name if the file being written was read from another
location;
- ${COUNT} - An incremental counter.
ExpressionFilenameParser can use any expression language supported by Mule
to construct a file name for the current message. Expressions can be xpath, xquery, ognl, mvel, header,
function
and more. For more information see http://muledocs.org/v2/Expressions.
For example an xpath expression can be defined to pull a message id out of an xml message and use that
as the file name -
${xpath:/message/header/@id}
This parser superseeds the legacy-filename-parser which has been kept in
Mule 2 for
compatibility. The following demonstrates how to achieve the same results when using the
expression-filename-parser over the legacy-filename-parser.
- ${DATE} : ${function:dateStamp}
- ${DATE:yy-MM-dd} : ${function:dateStamp(yy-MM-dd)}
- ${SYSTIME} : ${function:systime}
- ${UUID} : ${function:uuid}
- ${ORIGINALNAME} : ${header:originalFilename}
- ${COUNT} : ${function:counter} - note that this is a global counter. If you want a local counter
per file connector then you should use the legacy-filename-parser.
- ${[Message Property Name]} : ${header:[Message Property Name]}
Allows the user to specify custom filename parser. The implementation has to implement
org.mule.transports.file.FilenameParser.
The implementation class name that implement s
org.mule.transports.file.FilenameParser.
A placeholder for flename parser elements.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy