Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

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

Array<FileInfo> Files.UnZip(id: string)

Unzips a file and returns array of extracted files

Array<FileInfo> Files.UnZip(id: string, directorySeparator: string)

Arguments

string id
Id of file
string id
of file
string directorySeparator
directory separator in file names *

Remarks

It saves the extracted files individually into database.

Example

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);

Remarks

It saves the extracted files individually into database.

Example

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);

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);
  • No labels