Udostępnij za pośrednictwem


ZipUtils.ZipFiles Method (List, String, Boolean)

Zips the requested files into the output ZipFile.

Namespace: Microsoft.Crm.UnifiedServiceDesk.CommonUtility
Assembly: Microsoft.Crm.UnifiedServiceDesk.CommonUtility (in Microsoft.Crm.UnifiedServiceDesk.CommonUtility.dll)

Usage

'Usage
Dim fileNames As List(Of String)
Dim outputZipFile As String
Dim flattenStructure As Boolean
Dim returnValue As Boolean

returnValue = ZipUtils.ZipFiles(fileNames, outputZipFile, flattenStructure)

Syntax

'Declaration
Public Shared Function ZipFiles ( _
    fileNames As List(Of String), _
    outputZipFile As String, _
    <OptionalAttribute> Optional flattenStructure As Boolean = False _
) As Boolean
public static bool ZipFiles (
    List<string> fileNames,
    string outputZipFile,
    [OptionalAttribute] bool flattenStructure
)
public:
static bool ZipFiles (
    List<String^>^ fileNames, 
    String^ outputZipFile, 
    [OptionalAttribute] bool flattenStructure
)
public static boolean ZipFiles (
    List<String> fileNames, 
    String outputZipFile, 
    /** @attribute OptionalAttribute() */ boolean flattenStructure
)
public static function ZipFiles (
    fileNames : List<String>, 
    outputZipFile : String, 
    flattenStructure : boolean
) : boolean

Parameters

  • fileNames
    Specifies the list of files to zip.
  • outputZipFile
    Specifies the output zip file.
  • flattenStructure
    Specifies whether to flatten the directory structure or not. If true, the files won't retain their actual directory structure and will be added under the source directory.

Return Value

Type: Boolean
true if the files are zipped successfully; otherwise, false.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

See Also

Reference

ZipUtils Class
ZipUtils Members
Microsoft.Crm.UnifiedServiceDesk.CommonUtility Namespace

Unified Service Desk
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.