RarEntry::getUnpackedSize

(PECL rar >= 0.1)

RarEntry::getUnpackedSize — 항목의 압축을 푼 크기 가져오기


설명

public RarEntry::getUnpackedSize(): int

아카이브 항목의 압축을 푼 크기를 가져옵니다.

메모: 32비트 길이의 플랫폼(Windows x64 포함)에서 반환되는 최대 크기는 2GiB로 제한됩니다. 상수 PHP_INT_MAX를 확인하십시오.


매개변수

이 함수에는 매개변수가 없습니다.


반환 값

압축을 푼 크기를 반환하거나 오류가 발생하면 false를 반환합니다.


변경 로그

버전 설명
PECL rar 2.0.0 Extended_data가 추가되었습니다.
PECL rar 3.0.0 이 메서드는 이제 64비트 정수가 있는 플랫폼에서 2GiB보다 큰 압축을 푼 크기의 올바른 값을 반환하고 다른 플랫폼에서는 음수 값을 반환하지 않습니다.

Examples

예제 #1 RarEntry::getUnpackedSize() 예제

                  
<?php

$rar_file = rar_open('example.rar') or die("Failed to open Rar archive");

$entry = rar_entry_get($rar_file, 'Dir/file.txt') or die("Failed to find such entry");

echo "Unpacked size of " . $entry->getName() . " = " . $entry->getPackedSize() . " bytes";

?>