File System Bulk
This adapter simplifies the use of file operations in Technical Processes. It allows to easily perform actions such as listing, moving, and copying multiple files or directories. The compatibility with the ZIP in Memory Compression adapter allows to easily (un)pack multiple files and directories.
Properties
Operation | Defines the operation executed by the adapter Possible values:
|
Input and output structures of the File System Bulk adapter are compatible with the ZIP in Memory Compression adapter's structures.
Parameters
Adapter | Main adapter class (do not change!) Possible values: de.softproject.integration.adapter.filesystem.Bulk: Main class (Default) |
baseDirectory | Base directory for all operations.
Possible values: Absolute path to the base directory |
subDirectory | Directory relative to the Possible values:
|
limit | Limits the amount of results returned by a list operation. Possible values:
When searching for files, it is recommended to set the parameter |
maxLevel | Specifies the recursion depth for list operations. Possible values:
|
filter | Regular expression applied to the relative path of an entry in case of a list operation. If the regular expression applies, the path will be included in the result set of the list. |
skipDirectories | Defines whether a list operation can return directory elements in the result. Possible values:
|
overwrite | Defines whether a Possible values:
|
strict | Defines whether parent directories have to exist for Possible values:
|
Status values
1 | All entries for the operation could be executed successfully. |
0 | Not all entries for the operation could be executed successfully, i.e. the result contains |
-1 | Other technical problems occurred during the execution, e.g. invalid input. |
Input
Input structure for Read, Write, GetMetadata and Delete
<any>
<!-- any mixture of file and directory elements -->
<File name="relativePath">...Base64 content for Write...</File>
<Directory name="relativePath" />
</any>
Input structure for Copy and Move
<any>
<!-- any mixture of file and firectory elements -->
<File name="relativePath" target="relativePath" />
<Directory name="relativePath" target="relativePath" />
</any>
Output
<Data>
<!-- any mixture of file, directory and error elements -->
<File name="relativePath" [size="size of file in bytes"]
[creationTime=""] [creationTimeAsMillis=""]
[lastModifiedTime=""] [lastModifiedTimeAsMillis=""]
[lastAccessTime=""] [lastAccessTimeAsMillis=""]>
<!-- base64 conten, if operation Read or ListAndRead -->
<!-- xml structures containing metadata, if operation GetMetadata or ListWithMetadata -->
</File>
<Directory name="relativePath" [size="0"]
[creationTime=""] [creationTimeAsMillis=""]
[lastModifiedTime=""] [lastModifiedTimeAsMillis=""]
[lastAccessTime=""] [lastAccessTimeAsMillis=""]>
<!-- xml structures containing metadata, if operation GetMetadata or ListWithMetadata -->
</Directory>
<Error name="relativePath" [target="relativePath"] exception="fully qualified classname of exception"
[size="size of file in bytes"]
[creationTime=""] [creationTimeAsMillis=""]
[lastModifiedTime=""] [lastModifiedTimeAsMillis=""]
[lastAccessTime=""] [lastAccessTimeAsMillis=""]>
<!-- base64 content, if operation Write -->
</Error>
</Data>
Write, Delete, Copy and Move only have Error elements as result, if there have actually been errors.
Example for List
Prerequisites
The following directory structure is given:
/
+ a/
| + index.html
| + logo.gif
| + content/
| + toc.html
| + page1.html
| + page2.html
| + images/
| + pic1.png
| + pic2.png
+ b/
+ some.html
+ other.html
+ files.html
Szenarios
List everything
Adapter configuration | Output |
---|---|
|
XML
|
The first five entries
Adapter configuration | Output |
---|---|
|
XML
|
The first five files
Adapter configuration | Output |
---|---|
|
XML
|
Only the current directory
Adapter configuration | Output |
---|---|
|
XML
|
All files and directories complying a filter
Adapter configuration | Output |
---|---|
|
XML
|
All files complying a filter (without directories)
Adapter configuration | Output |
---|---|
|
XML
|
Everything beneath a subdirectory
Adapter configuration | Output |
---|---|
|
XML
|
Everything beneath the current directory and the direct child directories
Adapter configuration | Output |
---|---|
|
XML
|
The start directory can be located at any depth within the directory
Adapter configuration | Output |
---|---|
|
XML
|