Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP Manual > Rar::getAttr - Get attributes of the entry





ลองใช้ค้นหาข้อมูล


   
Bookmark.

Rar::getAttr

(No version information available, might be only in CVS)

Rar::getAttrGet attributes of the entry

Description

Rar
int getAttr ( void )

Rar::getAttr() returns attributes of the archive entry.

Return Values

Returns the attributes or FALSE on error.

Examples

Example #1 Rar::getAttr() example

<?php

$rar_file 
rar_open('example.rar') or die("Can't open Rar archive");

$entry rar_entry_get($rar_file'dir/in/the/archive') or die("Can't find such entry");

$host_os $entry->getHostOs();
$attr $entry->getAttr();

switch(
$host_os) {
    case 
RAR_HOST_MSDOS:
    case 
RAR_HOST_OS2:
    case 
RAR_HOST_WIN32:
    case 
RAR_HOST_MACOS:
        
printf("%c%c%c%c%c%c\n",
                (
$attr 0x08) ? 'V' '.',
                (
$attr 0x10) ? 'D' '.',
                (
$attr 0x01) ? 'R' '.',
                (
$attr 0x02) ? 'H' '.',
                (
$attr 0x04) ? 'S' '.',
                (
$attr 0x20) ? 'A' '.');
        break;
    case 
RAR_HOST_UNIX:
    case 
RAR_HOST_BEOS:
        switch (
$attr 0xF000)
        {
            case 
0x4000:
                
printf("d");
                break;
            case 
0xA000:
                
printf("l");
                break;
            default:
                
printf("-");
                break;
        }
        
printf("%c%c%c%c%c%c%c%c%c\n",
                (
$attr 0x0100) ? 'r' '-',
                (
$attr 0x0080) ? 'w' '-',
                (
$attr 0x0040) ? (($attr 0x0800) ? 's':'x'):(($attr 0x0800) ? 'S':'-'),
                (
$attr 0x0020) ? 'r' '-',
                (
$attr 0x0010) ? 'w' '-',
                (
$attr 0x0008) ? (($attr 0x0400) ? 's':'x'):(($attr 0x0400) ? 'S':'-'),
                (
$attr 0x0004) ? 'r' '-',
                (
$attr 0x0002) ? 'w' '-',
                (
$attr 0x0001) ? 'x' '-');
        break;
}

rar_close($rar_file);

?>

See Also



ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 00
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่