VFS Transport Project User Guide
The VFS connector allows files to be read and written to and from directories using a variety of VFS filesystem types. These types include:
The 1.3.3 version of the VFS connector is based on the Apache Commons VFS 1.0 library.
Installation Instructions and Examples are also available.
 | Currently, the VFS connector will only work on Mule 1.3.3. Support for 1.4 is underway. |
VFS Connector Properties
| Property |
Description |
Default |
Required |
| pollingFrequency |
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. |
30000 |
No |
| filenameParser |
Is an implementation of org.mule.providers.file.FilenameParser and is used to control how filename patterns are used to generate file names. The file provider has a default implementation called org.mule.providers.file.SimpleFilenameParser that 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
|
org.mule.providers.file. SimpleFilenameParser |
Yes |
| outputPattern |
The default pattern to use when writing a file to the VFS filesystem. This can use the patterns supported by the filenameParser configured for this connector.
You can also override this pattern by explicitly setting a property on the Mule message (use the key VfsConnector.PROPERTY_FILENAME). |
|
Yes |
| fileExtension |
The file extension used to filter files in the read directory. |
|
Yes |
| outputAppend |
Determines whether the file being written should append to an existing file if one exists. |
false |
No |
| includeSubFolders |
Determines whether to include subfolders in the read directory |
false |
No |
| autoDelete |
Determines whether to delete the file in the read directory after it has been processed (if applicable) |
true |
No |
fileSystemOptions |
Allows setting VFS FileSystemOptions object. |
|
No |
VFS Endpoints
VFS endpoints are expressed using standard VFS URI syntax, prefixed by the "vfs":
For example, and SFTP endpoint could be configured as follows:
This endpoint would connect over SFTP to myhost.com as mule/test123, then read or write to /tmp/mule-vfs.
Transformers
| Transformer |
Description |
org.mule.providers.vfs.transformers.FileObjectToByteArray |
Transforms the contents of a FileObject into a byte array |
FileObjectToByteArray is used if no other transformers are specified.