/sources/zip.php

Description
Functions
crc32_file (line 66)

Calculate CRC32 for a file. Based on a function in the PHP docs.

  • return: The CRC
integer crc32_file (PATH $filename)
  • PATH $filename: The file
create_zip_file (line 124)

Create a zip file.

  • return: The data for the zip file OR a tuple: data, offsets, sizes
mixed create_zip_file (array $file_array, [boolean $stream = false], [boolean $get_offsets = false])
  • array $file_array: A list of maps (time,data/full_path,name) covering everything to zip up
  • boolean $stream: Whether to stream the output direct to the browser
  • boolean $get_offsets: Whether to return the tuple
zip_scan_folder (line 28)

Add a folder to the TAR archive, however only store files modifed after a threshold time. It is incremental (incremental backup), by comparing against a threshold before adding a file (threshold being time of last backup)

  • return: A list of maps that stores time,full_path,name, for each file
array zip_scan_folder (PATH $path, [PATH $subpath = ''])
  • PATH $path: The full path to the folder to add
  • PATH $subpath: The subpath relative to the path (should be left as the default '', as this is used for the recursion to distinguish the adding base path from where it's currently looking)

Documentation generated on Sun, 02 Jan 2011 23:29:37 +0000 by phpDocumentor 1.4.3