ComponentOne VSView 8.0
ArchiveInfo Property

Gets information from a ComponentOne archive file.

Syntax

[form!]VSPrinter.ArchiveInfo(arcFileName As String, InfoType As ArchiveInfoSettings, [ Index As Variant ])[ = value As Variant ]

Remarks

This property allows you to get information from an archive file created with the Archive method.

The parameters for the ArchiveInfo property are described below:

Parameter

Description

ArcFile$

Name of the archive file, including its path.

Info%

Type of information that is to be retrieved from the archive. Valid settings are listed in the following table.

Index%

Optional zero-based index that specifies which file in the archive should be processed.

Valid settings for the Info parameter are:

Constant

Value

Description

arcFileCount

0

Number of files in the archive.

arcFileName

1

Name of the file specified by the Index parameter.

arcFileSize

2

Original size of the file specified by the Index parameter.

arcFileCompSize

3

Compressed size of the file specified by the Index parameter.

arcFileDate

4

Date and time when the file specified by the Index parameter was last modified.

For example, the following code lists the contents of an archive file.

Private Sub ArcList(fn$)

  Dim i%, cnt%

  With vp

    On Error Resume Next

    cnt = .ArchiveInfo(f, arcFileCount)

    Debug.Print "Archive "; fn; " ("; cnt; ") files"

    Debug.Print "Name", "Size", "Compressed"

    For i = 0 To cnt - 1

      Debug.Print .ArchiveInfo(f, arcFileName, i),

      Debug.Print .ArchiveInfo(f, arcFileSize, i),

      Debug.Print .ArchiveInfo(f, arcFileCompressedSize, i)

    Next

    If Err > 0 Then MsgBox "An error occurred while processing " & fn

  End With

End Sub

Note: For safety reasons, this property is disabled when the control is hosted on a Web page.

Data Type

Variant

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback