Adds a folder to a compressed zip archive.

syntaxSyntax:
DlxFile.AddFolder(name)

Parameters

Parameter Description
name Folder name.

Return Value

If the operation ends correctly it returns true otherwise it returns false.

Example

  Copy codeCopy code
var file = new DlxFile("www.mysite/files/myfile.pdf", DlxApp.FILEOPEN_READBINARY);
if (file.IsValid())
{
  var zip = new DlxFile("demo.zip", DlxApp.FILEOPEN_ZIP);
  zip.AddFile(file, "demo.bin");
  zip.AddText("demo1.txt", "Text file demo 1.");
  zip.AddFolder("folder1");
  zip.AddText("folder1/demo2.txt", "Text file demo 2.");
  zip.Close();
};

See also