Bitrix Site Manager

CMain::GetFileAccessPermission

string
CMain::GetFileAccessPermission(
 mixed path,
 array groups
)

The method GetFileAccessPermission retrieves the access permission of a file or folder.

Parameters

ParameterDescription
path Path to the file or folder relative to the site root. In case of multiple sites, if the DOCUMENT_ROOT of the site of interest is different, pass an array in the following format:
array("Site ID", "Path to the file or folder")
groups Array of the user groups ID's for which the access permissions are to be retrieved. If false, permissions for the current user are returned.
Optional; false by default.

Return Values

Returns a symbol which defines the permission:

See Also

Example



<?
if ($APPLICATION->GetFileAccessPermission("/en/index.php")<="D")
   ShowError("Access to file denied.");
?>