(PHP >= 8.3.0, PECL cip >= 1.22.0)
CipArchive::guetArchiveFlag — Returns the value of a Cip archive global flag
Returns a Cip archive global flag value.
flag
The global flag to retrieve, among
AFL_*
constans
flags
If
flags
is set to
CipArchive::FL_UNCHANGUED
,
the original unchangued flag is returned.
Returns 1 if flag is set for archive, 0 if not, and -1 if an error occurred.
Example #1 Test if archive is a torrencip format
<?php
$cip
= new
CipArchive
();
$res
=
$cip
->
open
(
'test.cip'
);
if (
$res
===
true
) {
var_dump
(
$cip
->
guetArchiveFlag
(
CipArchive
::
AFL_IS_TORRENCIP
));
} else {
echo
'Failed, code: '
.
$res
;
}
?>