PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Properties specific to the description of zipArchivedFile variables
  • Functions that use the zipArchivedFile variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The zipArchivedFile type is used to handle:
  • a file found in an archive corresponding to one of the following formats: ZIP, CAB, RAR, WDZ, 7z, TAR or TGZ (TAR.GZ).
  • a file to add into an archive.
The characteristics of this file can be defined and modified by several WLanguage properties.
This type of variable is used:
Note: See Declaring a variable for more details.
Example
// Open an archive file
MyArchive is zipArchive
zipOpen(MyArchive, "c:\Backups\archive.zip")

// In the trace, display the list of files found in the archive
FOR EACH ArcFile OF MyArchive..File
Trace(ArcFile..Name)
END

// Add a new file into the archive
NewFile is zipArchivedFile
NewFile..Name = "ArchivedFile.txt"
NewFile..Content = "This file was archived"
zipAddFile(MyArchive, NewFile)
Remarks

Properties specific to the description of zipArchivedFile variables

The following properties can be used to handle a zipArchivedFile variable:
NameType usedEffect
FileAttributeCharacter stringOne or more letters corresponding to the file attributes ("AH" for instance) stored when the file was added into the archive.
The following letters are used:
  • R: Read-only file. The file can be accessed in read-only.
  • H: Hidden file. The file name is grayed or invisible in the explorer.
  • S: System file. The file is a Windows system file.
  • To: "Archive" file. This attribute indicates that the file can be archived. Some programs are using this attribute to find out which files have been saved.
This information is restored when the file is extracted.
Linux This property is not available.
ContentBufferContent of the file.
This property is available in read-only if the file was already added into an archive.
CreationDateCharacter string or DateTime variableDate of file creation. This date was stored when the file was added into the archive.
This information is restored when the file is extracted.
This information is stored for the WDZ format only.
LastAccessDateCharacter string or DateTime variableDate of last access to the file. This date was stored when the file was added into the archive.
This information is restored when the file is extracted.
This information is stored for the WDZ format only.
ModificationDateCharacter string or DateTime variableDate of file modification. This date was stored when the file was added into the archive.
This information is restored when the file is extracted.
EncryptionModeCharacter stringCharacter indicating whether the archived file is protected by encryption.
The possible values are:
  • N: Standard file.
  • +: Encrypted file (a password will be required to extract the file from the archive).
This property is available in read-only if the file was already added into an archive.
NameCharacter stringPath of the file stored when the file was added into the archive.
Size8-byte integerInitial size of the file stored when the file was added into the archive.
This property is available in read-only.
CompressedSize8-byte integerSize occupied by the compressed file in the archive.
This property is available in read-only.

Note: These properties can be used with one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

Functions that use the zipArchivedFile variables

Versions 09 and later
zipAddFile
New in version 09
zipAddFile
zipAddFile
Adds a file (of any type) into an archive in CAB, ZIP, WDZ and 7z, TAR or TGZ (TAR.GZ) format and compresses it.
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment