<?php fileperms(string $filename): int|false
<?php $location = $this->prefixer->prefixPath($path); clearstatcache(false, $location); error_clear_last(); $fileperms = @fileperms($location); if ($fileperms === false) { throw UnableToRetrieveMetadata::visibility($path, error_get_last()['message'] ?? '');
<?php private function assertFileHasPermissions(string $file, int $expectedPermissions): void { clearstatcache(false, $file); $permissions = fileperms($file) & 0777; $this->assertEquals($expectedPermissions, $permissions); }