PHP 클래스 Prado\IO\TTarFileExtractor

부터: 3.0
저자: Vincent Blavet ([email protected])
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

공개 메소드들

메소드 설명
__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.