Guidance
指路人
g.yi.org
Software / Reginald / Examples / zipexams / UnzipFiles.rex

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
/* This script shows how to use the RxUnzip add-on DLL to extract the
 * contents of a ZIP archive. NOTE: To create the test archive, run the
 * ZipVars.rex example.
 */

OPTIONS "C_CALL"

/* Register the RxUnzip add-on DLL */
LIBRARY rxunzip

/* Tell RxUnzip to raise SYNTAX condition for any failure with an Unzip function */
ziperr = "SYNTAX"
zipheading = 1

DO
	/* Open a ZIP archive named "MyTest.zip" on disk (in the current directory).
	 * Store the ZIP handle in a variable named "ZipHandle".
	 */
	unzipopen("ZipHandle", "MyTest.zip")

	/* Determine how many items are in the archive. */
	unzipfinditem(ziphandle, "Count")

	/* Unzip each item in the archive. */
	DO i = 1 TO count

		/* Set the next item as the current item, and get info on it. */
		unzipsetcurrentitem(ziphandle, "Info", i)

		SAY "Unzipping..." info.0
		SAY "Size =" info.1
		SAY "Access Time =" info.4
		SAY "Creation Time =" info.5
		SAY "Last Modified Time =" info.6

		unzipgetitem(ziphandle, info.0)
	END

	/* We're done with our ZIP archive on disk, so just let the FINALLY section close it. */

	CATCH SYNTAX
		CONDITION('M')

	FINALLY
		/* Make sure any ZIP archive we opened above is closed. */
		IF EXISTS("ZIPHANDLE") THEN unzipclose(ziphandle)
END
掌柜推荐
 
 
¥289.00 ·
 
 
¥1,080.00 ·
 
 
¥1,380.00 ·
 
 
¥638.00 ·
 
 
¥1,290.00 ·
 
 
¥1,420.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2010-07-16 20:49:38