TAR¶
-
class
OC\Archive\TAR¶ Source: lib/private/Archive/TAR.php#38 Parent: OC\Archive\Archive
Constants¶
-
PLAIN = 0 Source: lib/private/Archive/TAR.php#39
-
GZIP = 1 Source: lib/private/Archive/TAR.php#40
-
BZIP = 2 Source: lib/private/Archive/TAR.php#41
Properties¶
Methods¶
-
public
OC\Archive\TAR::__construct($source)¶ Source: Parameters: - $source (string)
-
public static
OC\Archive\TAR::getTarType($file)¶ - try to detect the type of tar compression
Source: Parameters: - $file (string)
Returns: int
-
public
OC\Archive\TAR::addFolder($path)¶ - add an empty folder to the archive
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Archive\TAR::addFile($path, $source="")¶ - add a file to the archive
Source: Parameters: - $path (string)
- $source (string) either a local file or string data
Returns: bool
-
public
OC\Archive\TAR::rename($source, $dest)¶ - rename a file or folder in the archive
Source: Parameters: - $source (string)
- $dest (string)
Returns: bool
-
public
OC\Archive\TAR::filesize($path)¶ - get the uncompressed size of a file in the archive
Source: Parameters: - $path (string)
Returns: int
-
public
OC\Archive\TAR::mtime($path)¶ - get the last modified time of a file in the archive
Source: Parameters: - $path (string)
Returns: int
-
public
OC\Archive\TAR::getFolder($path)¶ - get the files in a folder
Source: Parameters: - $path (string)
Returns: array
-
public
OC\Archive\TAR::getFiles()¶ - get all files in the archive
Source: lib/private/Archive/TAR.php#229 Returns: array
-
public
OC\Archive\TAR::getFile($path)¶ - get the content of a file
Source: Parameters: - $path (string)
Returns: string
-
public
OC\Archive\TAR::extractFile($path, $dest)¶ - extract a single file from the archive
Source: Parameters: - $path (string)
- $dest (string)
Returns: bool
-
public
OC\Archive\TAR::extract($dest)¶ - extract the archive
Source: Parameters: - $dest (string)
Returns: bool
-
public
OC\Archive\TAR::fileExists($path)¶ - check if a file or folder exists in the archive
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Archive\TAR::remove($path)¶ - remove a file or folder from the archive
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Archive\TAR::getStream($path, $mode)¶ - get a file handler
Source: Parameters: - $path (string)
- $mode (string)
Returns: bool | resource
-
public
OC\Archive\TAR::writeBack($tmpFile, $path)¶ - write back temporary files
Source: lib/private/Archive/TAR.php#369
-
public
OC\Archive\TAR::getError()¶ - Get error object from archive_tar.
Source: lib/private/Archive/TAR.php#389