xattr_get
(PECL xattr >= 0.9.0)
xattr_get — دریافت ویژگی توسعه یافته
Description
string xattr_get
( string $filename
, string $name
[, int $flags = 0
] )
این تابع مقدار ویژگی توسعه یافته فایل را دریافت میکند.
Extended attributes have two different namespaces: user and root. The user namespace is available to all users, while the root namespace is available only to users with root privileges. xattr operates on the user namespace by default, but this can be changed with the flags parameter.
Parameters
- filename
-
فایل برای حذف ویژگی آن.
- name
-
نام ویژگی.
- flags
-
پرچمهای پشتیبانی شده xattr XATTR_DONTFOLLOW پیوند سمبولیک را دنبال نکنید و بر روی خود پیوند عمل کنید. XATTR_ROOT ویژگی را در فضای نام (مورد اعتماد) ریشه تعیین کنید. نیازمند امتیاز ریشه است.
Return Values
بازگرداندن رشته شامل مقدار یا FALSE اگر ویژگی وجود نداشته باشد.
Examples
Example #1 بررسی امضای فایل توسط مدیر سیستم
<?php
$file = '/usr/local/sbin/some_binary';
$signature = xattr_get($file, 'Root signature', XATTR_ROOT);
/* ... check if $signature is valid ... */
?>
See Also
- xattr_list() - دریافت فهرست ویژگی توسعه یافته
- xattr_set() - Set an extended attribute
- xattr_remove() - حذف ویژگی توسعه یافته
There are no user contributed notes for this page.
