Archive

class OC\Archive\Archive
Source:lib/private/Archive/Archive.php#33

Methods

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

lib/private/Archive/Archive.php#37

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

lib/private/Archive/Archive.php#43

Parameters:
  • $path (string)
Returns:

bool

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

lib/private/Archive/Archive.php#50

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

bool

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

lib/private/Archive/Archive.php#57

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

bool

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

lib/private/Archive/Archive.php#63

Parameters:
  • $path (string)
Returns:

int

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

lib/private/Archive/Archive.php#69

Parameters:
  • $path (string)
Returns:

int

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

lib/private/Archive/Archive.php#75

Parameters:
  • $path (string)
Returns:

array

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

lib/private/Archive/Archive.php#86

Parameters:
  • $path (string)
Returns:

string

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

lib/private/Archive/Archive.php#93

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

bool

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

lib/private/Archive/Archive.php#99

Parameters:
  • $dest (string)
Returns:

bool

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

lib/private/Archive/Archive.php#105

Parameters:
  • $path (string)
Returns:

bool

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

lib/private/Archive/Archive.php#111

Parameters:
  • $path (string)
Returns:

bool

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

lib/private/Archive/Archive.php#118

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

bool | resource

public OC\Archive\Archive::addRecursive($path, $source)
add a folder and all its content
Source:

lib/private/Archive/Archive.php#124

Parameters:
  • $path (string)
  • $source (string)