OTX Reference
|
|
Compresses the file or folder More...
Public Attributes | |
BooleanTerm | _override |
Determines whether an already existing target file will be overridden or not. More... | |
BooleanTerm | append |
Zipped sources shall be appended to an existing ZIP file if flag is true or replacing that ZIP file with a new one if flag is true More... | |
ListTerm | extensions |
Contains a list of file extension strings. Only files, that have the given file extension (e.g. "txt": files ending with .txt) will be stored in the zip file. More... | |
StringTerm | source |
Contains the path to the to-be-zipped file or folder More... | |
StringTerm | target |
Contains the path to the target ZIP file More... | |
Public Attributes inherited from OpenTestSystem.Otx.Core.Actions.ActionRealisation | |
OtxLink | validFor |
Validity of ActionRealisation. More... | |
Compresses the file or folder
The ZipFile activity to compresses the file or folder denoted by the given source path. If the path points to a single file, only that file will be stored in the target file. If the path points to a folder, the folder and all its contents (files and subfolders in arbitrary depth) will be stored in the target file. In the case of a folder, that folder will be the root element in the target file.
It is possible to control which files to add by passing in a list of allowed file extensions. Only the files that match one of the given file extension strings will be added (including the folder structures they are contained in).
Furthermore it is possible to specify whether an existing target file will be overridden or not.Depending on whether the source(s) will be appended to an existing ZIP file, a flag controls whether or not the corresponding flag is set to TRUE, then any existing ZIP file will be silently overridden.Otherwise, if the flag is set to FALSE and the denoted target file already exists, an exception is thrown.
BooleanTerm OpenTestSystem.Otx.Extensions.ZipHandling.Actions.ZipFile._override |
Determines whether an already existing target file will be overridden or not.
If the flag evaluates to TRUE, an existing target file will be silently overridden. If it evaluates to FALSE, an existing target file will cause an exception to be thrown. If the flag is omitted, it defaults to FALSE. If the append flag is present and evaluates to TRUE, then the override flag concerns overriding files in the target ZIP file.This means, that the above mentioned rules are applied to the contents of the target ZIP file, possibly throwing a FileAlreadyExistsException, if any of the source files is already stored in the denoted ZIP file. In case an exception occurs the existing zip file will be unchanged.
BooleanTerm OpenTestSystem.Otx.Extensions.ZipHandling.Actions.ZipFile.append |
Zipped sources shall be appended to an existing ZIP file if flag is true or replacing that ZIP file with a new one if flag is true
If this flag is omitted, it defaults to FALSE. If the target ZIP file does not exist and the append flag is provided and resolves to TRUE, a FileNotFoundException is thrown.
ListTerm OpenTestSystem.Otx.Extensions.ZipHandling.Actions.ZipFile.extensions |
Contains a list of file extension strings. Only files, that have the given file extension (e.g. "txt": files ending with .txt) will be stored in the zip file.
This element is optional and if omitted, no filtering is performed, accepting any file with any file extension. In case, that files without an extension will be zipped an empty string is used. It is possible to provide strings that contain wildcard characters.These are used as placeholders for arbitrary characters. The characters are:
StringTerm OpenTestSystem.Otx.Extensions.ZipHandling.Actions.ZipFile.source |
Contains the path to the to-be-zipped file or folder
The path will be a URI, relative to the OTX_HOME directory. If the file or folder denoted by this path does not exist or is not accessible, an exception is thrown.
StringTerm OpenTestSystem.Otx.Extensions.ZipHandling.Actions.ZipFile.target |
Contains the path to the target ZIP file
The path will be a URI, relative to the OTX_HOME directory. If the file denoted by this path already exists and the override flag is not set or set to FALSE, then an exception is thrown. Also if the file already exists and cannot be overridden, or if it cannot be created at the given location, an exception is thrown.