Page tree
Skip to end of metadata
Go to start of metadata

Overview

FileInfo[] Files.UnZip ( id )

Extracts the files inside an archive file into database and returns an array containing file information.

Arguments

String id

Id of file

Remarks

This function is used to extract contents of an archive file.

It saves the extracted files individually into database.

Examples

Usage
var unzippedFiles = $Files.UnZip(zipFile.Id);

unzippedFiles.forEach(function(file) {
	var fileContent = $Files.GetString(file.Id);
	// do sth with the file content
});

// It would be a good practice to delete the archive file when you are finished using it
// since the files in it are also saved by calling the UnZip method
$Files.Delete(zipFile.Id);

See Also

FileInfo


  • No labels