RarArchive::getComment

rar_comment_get

(PECL rar >= 2.0.0)

RarArchive::getComment -- rar_comment_get — RAR 아카이브에서 주석 텍스트 가져오기


설명

Object-oriented style (method):

public RarArchive::getComment(): string

Procedural style:

rar_comment_get(RarArchive $rarfile): string

RAR 아카이브에 저장된 (전역) 주석을 가져옵니다. 길이는 최대 64KiB일 수 있습니다.

메모: 이 확장은 엔트리 레벨에서 주석을 지원하지 않습니다.


매개변수

rarfile
rar_open()으로 열린 RarArchive 객체.

반환 값

주석을 반환하거나 주석이 없으면 null을 반환합니다.

메모: RAR은 현재 유니코드 주석을 지원하지 않습니다. 이 함수의 결과 인코딩은 지정되지 않았지만 아마도 Windows-1252일 것입니다.


Examples

예제 #1 객체 지향 스타일

                  
<?php
$rar_arch = RarArchive::open('commented.rar');
echo $rar_arch->getComment();
?>
                  
                

위의 예는 다음과 유사한 결과를 출력합니다.

This is the comment of the file commented.rar.
                

예제 #2 절차 스타일

                  
<?php
$rar_arch = rar_open('commented.rar');
echo rar_comment_get($rar_arch);
?>