ZIP

class OC\Archive\ZIP
Source:lib/private/Archive/ZIP.php#38
Parent:OC\Archive\Archive

Properties

Methods

public OC\Archive\ZIP::__construct($source)
Source:

lib/private/Archive/ZIP.php#48

Parameters:
  • $source (string)
public OC\Archive\ZIP::addFolder($path)
add an empty folder to the archive
Source:

lib/private/Archive/ZIP.php#61

Parameters:
  • $path (string)
Returns:

bool

public OC\Archive\ZIP::addFile($path, $source="")
add a file to the archive
Source:

lib/private/Archive/ZIP.php#70

Parameters:
  • $path (string)
  • $source (string) either a local file or string data
Returns:

bool

public OC\Archive\ZIP::rename($source, $dest)
rename a file or folder in the archive
Source:

lib/private/Archive/ZIP.php#88

Parameters:
  • $source (string)
  • $dest (string)
Returns:

bool | null

public OC\Archive\ZIP::filesize($path)
get the uncompressed size of a file in the archive
Source:

lib/private/Archive/ZIP.php#98

Parameters:
  • $path (string)
Returns:

int

public OC\Archive\ZIP::mtime($path)
get the last modified time of a file in the archive
Source:

lib/private/Archive/ZIP.php#107

Parameters:
  • $path (string)
Returns:

int

public OC\Archive\ZIP::getFolder($path)
get the files in a folder
Source:

lib/private/Archive/ZIP.php#115

Parameters:
  • $path (string)
Returns:

array

public OC\Archive\ZIP::getFiles()
get all files in the archive
Source:lib/private/Archive/ZIP.php#132
Returns:array
public OC\Archive\ZIP::getFile($path)
get the content of a file
Source:

lib/private/Archive/ZIP.php#145

Parameters:
  • $path (string)
Returns:

string

public OC\Archive\ZIP::extractFile($path, $dest)
extract a single file from the archive
Source:

lib/private/Archive/ZIP.php#154

Parameters:
  • $path (string)
  • $dest (string)
Returns:

bool | null

public OC\Archive\ZIP::extract($dest)
extract the archive
Source:

lib/private/Archive/ZIP.php#163

Parameters:
  • $dest (string)
Returns:

bool

public OC\Archive\ZIP::fileExists($path)
check if a file or folder exists in the archive
Source:

lib/private/Archive/ZIP.php#171

Parameters:
  • $path (string)
Returns:

bool

public OC\Archive\ZIP::remove($path)
remove a file or folder from the archive
Source:

lib/private/Archive/ZIP.php#179

Parameters:
  • $path (string)
Returns:

bool

public OC\Archive\ZIP::getStream($path, $mode)
get a file handler
Source:

lib/private/Archive/ZIP.php#192

Parameters:
  • $path (string)
  • $mode (string)
Returns:

bool | resource

public OC\Archive\ZIP::writeBack($tmpFile, $path)
write back temporary files
Source:lib/private/Archive/ZIP.php#218