mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-28 14:58:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@169434 c90b9560-bf6c-de11-be94-00142212c4b1
78 lines
1.7 KiB
XML
78 lines
1.7 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.1 $ -->
|
|
<refentry id="function.Rar-getHostOs">
|
|
<refnamediv>
|
|
<refname>Rar::getHostOs</refname>
|
|
<refpurpose>Get entry host OS</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>Rar::getHostOs</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>Rar::getHostOs</function> return code of the host OS of the
|
|
archive entry.
|
|
</para>
|
|
<example>
|
|
<title><function>Rar::getHostOs</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?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");
|
|
|
|
switch ($entry->getHostOs()) {
|
|
case RAR_HOST_MSDOS:
|
|
echo "MS-DOS\n";
|
|
break;
|
|
case RAR_HOST_OS2:
|
|
echo "OS2\n";
|
|
break;
|
|
case RAR_HOST_WIN32:
|
|
echo "Win32\n";
|
|
break;
|
|
case RAR_HOST_MACOS:
|
|
echo "MacOS\n";
|
|
break;
|
|
case RAR_HOST_UNIX:
|
|
echo "Unix/Linux\n";
|
|
break;
|
|
case RAR_HOST_BEOS:
|
|
echo "BeOS\n";
|
|
break;
|
|
}
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
<para>
|
|
<function>Rar::getHostOs</function> returns &false; on error.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|