Extensions.ZipHandling.UnZipFile
Revision as of 07:30, 11 September 2019 by Nb (talk | contribs) (Created page with "{{DISPLAYTITLE:OTX '''CloseFile'''}}Category:File == Classification == {{ClassificationActivity | UnZipFile | Decompresses the ZIP file | Action | Extensions.File|O...")
Classification
Name | UnZipFile |
Short Description | Decompresses the ZIP file |
Class | Action |
Extension | OTX ZipHandling extension |
Group | ZipHandling related Actions |
Exceptions | FileAlreadyExistsException FileNotFoundException ZipFormatException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
ZipHandling.UnZipFile(StringTerm source, StringTerm target, ListTerm extensions, BooleanTerm override);
Description
Decompresses the ZIP file denoted by the given source path. The source path must point to a valid ZIP container (the file extension need not to be .zip).
It is possible to control which files to extract by passing in a pattern. Only the files that match the pattern will be extracted (including the folder structures they are contained in). Furthermore it is possible to specify whether any existing target files should be overridden or not. If the corresponding flag is set to TRUE, then any existing target file will be silently overridden.
Otherwise, if the flag is set to FALSE and a to-be-written file in the target location already exists, an exception is thrown.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Source | String | Term | - | [1..1] | Represents the XmlElement that contains the attribute. |
Target | String | Term | - | [1..1] | The name of the attribute. The value can contain an arbitrary namespace in form of "Prefix:Name". |
Extensions | List | Term | - | [0..1] | The new value of the attribute. |
Override | Boolean | Term | - | [0..1] | The new value of the attribute. |
OTL Examples
/// Local Declarations
File.FileReadHandle FileReadHandle;
/// Flow
FileReadHandle = File.OpenFileForRead("file:///D:/abc.txt", @Encoding:UTF-8);
File.CloseFile(FileReadHandle);
See also
DeleteDirectory
DeleteFile
SaveFile
WriteBytes
WriteFile
WriteLine