application/Espo/Core/Utils/File/Permission.php
public function getCurrentPermission($filePath)
    {
        if (!file_exists($filePath)) {
            return false;
        }

        $fileInfo= stat($filePath);

        return substr(base_convert($fileInfo['mode'],10,8), -4);
    }
public function getCurrentPermission($filePath)
    {
        if (!file_exists($filePath)) {
            return false;
        }

        $fileInfo= stat($filePath);

        return substr(base_convert($fileInfo['mode'],10,8), -4);
    }
public function getCurrentPermission ( $ filePath ) { if ( ! file_exists ( $ filePath ) ) { return false ; } $ fileInfo = stat ( $ filePath ) ; return substr ( base_convert ( $ fileInfo [ 'mode' ] , 10 , 8 ) , - 4 ) ; }
Get current permissions

@param string $filename
@return string | bool
Get current permissions