PHP: Rar::getHostOs - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Rar::getMethod Rar::getFileTime

Last updated: Sat, 27 Jan 2007

view this page in

# Rar::getHostOs

(no version information, might be only in CVS)

Rar::getHostOs -- Возвращает данные об операционной системе хоста

## Описание

int Rar::getHostOs ( void )

Rar::getHostOs() Возвращает данные об операционной системе хоста элемента архива.

Пример 1. Rar::getHostOs() пример использования

`<?php
$rar_file = rar_open('example.rar') or die("Невозможно открыть Rar архив");
$entry = rar_entry_get($rar_file, 'Dir/file.txt') or die("Такого элемента в архиве не существует");
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;
}
?>`

Rar::getHostOs() возвращает `FALSE` при ошибке.

add a note User Contributed Notes
Rar::getHostOs
There are no user contributed notes for this page.
Rar::getMethod Rar::getFileTime

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST