
21.03.2009, 22:58
|
|
Постоянный
Регистрация: 30.08.2007
Сообщений: 773
Провел на форуме: 3069349
Репутация:
808
|
|
Код:
if (($perms & 0xC000) == 0xC000) $info = 's';
else if (($perms & 0xA000) == 0xA000) $info = 'l';
else if (($perms & 0x8000) == 0x8000) $info = '-';
else if (($perms & 0x6000) == 0x6000) $info = 'b';
else if (($perms & 0x4000) == 0x4000) $info = 'd';
else if (($perms & 0x2000) == 0x2000) $info = 'c';
else if (($perms & 0x1000) == 0x1000) $info = 'p';
else $info = 'u';
Можно же сдвинуть вправо на 12 бит
|
|
|