PHP Класс Prado\IO\TTarFileExtractor

С версии: 3.0
Автор: Vincent Blavet ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string $p_tarname ) Archive_Tar Class constructor. This flavour of the constructor only declare a new Archive_Tar object, identifying it by the name of the tar file.
__destruct ( )
extract ( $p_path = '' )

Защищенные методы

Метод Описание
_dirCheck ( string $p_dir ) : boolean Check if a directory exists and create it (including parent dirs) if not.
_error ( $p_message )
_extractList ( $p_path, &$p_list_detail, $p_mode, $p_file_list, $p_remove_path )
_translateWinPath ( $p_path, $p_remove_disk_letter = true )
extractModify ( string $p_path, string $p_remove_path ) : boolean This method extract all the content of the archive in the directory indicated by $p_path. When relevant the memorized path of the files/dir can be modified by removing the $p_remove_path path at the beginning of the file/dir path.

Приватные методы

Метод Описание
_cleanFile ( )
_close ( )
_isArchive ( $p_filename = null )
_jumpBlock ( $p_len = null )
_openRead ( )
_readBlock ( )
_readHeader ( $v_binary_data, &$v_header )
_readLongHeader ( &$v_header )

Описание методов

__construct() публичный метод

Archive_Tar Class constructor. This flavour of the constructor only declare a new Archive_Tar object, identifying it by the name of the tar file.
public __construct ( string $p_tarname )
$p_tarname string The name of the tar archive to create

__destruct() публичный метод

public __destruct ( )

_dirCheck() защищенный метод

Check if a directory exists and create it (including parent dirs) if not.
protected _dirCheck ( string $p_dir ) : boolean
$p_dir string directory to check
Результат boolean true if the directory exists or was created

_error() защищенный метод

protected _error ( $p_message )

_extractList() защищенный метод

protected _extractList ( $p_path, &$p_list_detail, $p_mode, $p_file_list, $p_remove_path )

_translateWinPath() защищенный метод

protected _translateWinPath ( $p_path, $p_remove_disk_letter = true )

extract() публичный метод

public extract ( $p_path = '' )

extractModify() защищенный метод

While extracting a file, if the directory path does not exists it is created. While extracting a file, if the file already exists it is replaced without looking for last modification date. While extracting a file, if the file already exists and is write protected, the extraction is aborted. While extracting a file, if a directory with the same name already exists, the extraction is aborted. While extracting a directory, if a file with the same name already exists, the extraction is aborted. While extracting a file/directory if the destination directory exist and is write protected, or does not exist but can not be created, the extraction is aborted. If after extraction an extracted file does not show the correct stored file size, the extraction is aborted. When the extraction is aborted, a PEAR error text is set and false is returned. However the result can be a partial extraction that may need to be manually cleaned.
protected extractModify ( string $p_path, string $p_remove_path ) : boolean
$p_path string The path of the directory where the files/dir need to by extracted.
$p_remove_path string Part of the memorized path that can be removed if present at the beginning of the file/dir path.
Результат boolean true on success, false on error.