Transforms an array into a physical folder.
Supports custom file/folder naming through template CSV. Array2CSV component can be used to generate a CSV from an Array/folder, process it in a pipeline, and then, transform the array back into a folder preserving original file names and subdirectory structure.
Version | 1.2 |
---|---|
Bundle | builtin |
Categories | |
Specialties | generic |
Authors | Ville Rantanen (ville.rantanen@helsinki.fi) |
Issue tracker | View/Report issues |
Source files | component.xml Array2Folder.py |
Usage | Example with default values |
Name | Type | Mandatory | Description |
---|---|---|---|
in | Array<T1> (generic) | Mandatory | Array to be transformed |
template | CSV | Optional | Template CSV to reconstruct the initial folder structure. For all keys from array that occur in template column keyCol, the respective files in the output folder would have same name as in the template column fileCol. |
Name | Type | Description |
---|---|---|
out | BinaryFolder | The binary folder obtained from the array |
Name | Type | Default | Description |
---|---|---|---|
fileCol | string | "File" | Template input column for file names |
fileMode | string | "@key@_@file@" | The mode to generate the file name. Use the following tags in the string to create file names:
|
keyCol | string | "Key" | Template input column for keys |
link | boolean | false | Create symbolic links instead of copying the file. WARNING: You may potentially break the execution of components, if @keep=false is used. |
Test case | Parameters▼ | IN in |
IN template |
OUT out |
||
---|---|---|---|---|---|---|
case1 | (missing) | in | (missing) | out | ||
case2 | (missing) | in | (missing) | out | ||
case3 | (missing) | in | template | out | ||
case4 | (missing) | in | template | out | ||
case_fileMode | properties | in | (missing) | out | ||
fileMode=table_@key@_@ext@ |
||||||
case_flatDir | properties | in | (missing) | out | ||
fileMode=. |