Lucee Function Reference

extract()

Extract the data of a compressed file

Example

extract(string format,string source,string target):boolean

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Description
format string  Yes Format of the compressed file:
  • bzip
  • bzip2
  • gzip
  • tar
  • tbz (same as tar.bz)
  • tbz2
  • tgz (same as tar.gz)
  • zip  
  • source string  Yes Path (relative or absolute) to the source file or a directory with compressed files to extract  
    target string  Yes Path (relative or absolute) to the directory, where you want to extract the data.
    For **gzip / bzip / bzip2** (single file format) must use path including the name of the file