HB_UNZIPFILE()
Unzip a compressed file
- Syntax
-
- HB_UNZIPFILE( <cFile> , <bBlock> , <lWithPath>) ,<cPassWord>,<cPath>,
- [<cFile>|<aFile>] <---> lCompress
- Arguments
-
- <cFile> Name of the zip file
- <bBlock> Code block to execute while compressing
- <lWithPath> Toggle to create directory if needed
- <cPassWord> Password to use to extract files
- <cPath> Path to extract the files.
- <cFile>|<aFiles> An file or an Array of files to extract
- Returns
-
- <lCompress> .t. if all file was successfuly restored, otherwise .f.
- Description
-
- This function restores all files contained inside the <cFile>. If the extension is ommited, .ZIP will be assumed. If a file already exists, it wlll be overwriten.
- If <bBlock> is used, every time the file is opened to compress it will evaluate bBlock. Parameters of bBlock are cFile and nPos.
- The <cPath> is an obrogatory parameter. Set to ".\" to extract to the current dir
Examples
FUNCTION MAIN()
IF HB_UNZIPFILE( "TEST.ZIP")
qout("File was successly create")
ENDIF
IF HB_ZIPFILE( "TEST2.ZIP",{|cFile|,qout(cFile)})
qout("File was successly create")
ENDIF
Return Nil
- Status
- Ready
- Compliance
-
- This function is a Harbour extension
- Platforms
-
- All
- Files
-
- Library is zlib.lib and zlib_bor.lib For Borland Compilers Library is zlib.lib zlib_ms.lib for MSVC compilers