Udostępnij za pośrednictwem


ZipUtils.ZipFiles Method (String, String, Boolean)

Zips the directory specified to the output Zip File.

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

Usage

'Usage
Dim directoryToAdd As String
Dim outputZipFile As String
Dim flattenStructure As Boolean
Dim returnValue As Boolean

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

Syntax

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

Parameters

  • directoryToAdd
    Specifies the directory name.
  • outputZipFile
    Specifies the output zip file name.
  • 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 zip operation is successful; 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.