ZipFileWriter.Add

Syntax:

Add(<FileName>, <PathInclusionMethod>, <RecursiveSubfolderProcessing>)

Parameters:

<FileName> (required)

Type: String.
Name of the file to be placed in the archive or mask.
It is not allowed to use those national alphabet symbols in file or directory name, which will be composed from UNICODE symbols with data loss.
It is recommended to use latin symbols in names of files and directories.
Forbidden characters: > < | ? * / \ : ".

<PathInclusionMethod> (optional)

Type: ZIPStorePathMode.
A method that includes the paths to a file in the archive.
Default value: DontStorePath.

<RecursiveSubfolderProcessing> (optional)

Type: ZIPSubDirProcessingMode.
Processes additional subdirectories if files are added using a mask.
Default value: DontProcess.

Description:

Adds a new file to the archive.

Availability:

Thin client, server, thick client, external connection.

Note:

If upon opening it, an existing .ZIP file was specified in <FileName> parameter of Open method, execution of this method does not result in adding this file to the existing archive. As a result of Write method execution, a previously existing archive will be entirely replaced with the new one, whose contents is composed with this method.
Adding an current archive file to the archive results in an exception thrown at Write method execution.
It's sensible to specify <PathInclusionMethod> parameter if a file or a group of files are added to the archive by mask specified in <FileName> parameter.

    

1C:Enterprise Developer's Community