src/Factory/GroupFactory.php
public static function createFromFileGroup($filename)
    {
        if (!file_exists($filename)) {
            throw new \InvalidArgumentException('Invalid file name provided.');
        }
        if (!function_exists('posix_getgrgid')) {
            throw new PosixNotAvailableException(
                'Could not retrieve information about the operating system group because POSIX functions '
                . 'are not available to your PHP executable.'
            );
        }
        if (false === $gid = \filegroup($filename)) {
            throw new \Exception('Could not get the group of the file "' . $filename . '".');
        }
        return new Group($gid);
    }
public static function createFromFileGroup($filename)
    {
        if (!file_exists($filename)) {
            throw new \InvalidArgumentException('Invalid file name provided.');
        }
        if (!function_exists('posix_getgrgid')) {
            throw new PosixNotAvailableException(
                'Could not retrieve information about the operating system group because POSIX functions '
                . 'are not available to your PHP executable.'
            );
        }
        if (false === $gid = \filegroup($filename)) {
            throw new \Exception('Could not get the group of the file "' . $filename . '".');
        }
        return new Group($gid);
    }
public static function createFromFileGroup ( $ filename ) { if ( ! file_exists ( $ filename ) ) { throw new \ InvalidArgumentException ( 'Invalid file name provided.' ) ; } if ( ! function_exists ( 'posix_getgrgid' ) ) { throw new PosixNotAvailableException ( 'Could not retrieve information about the operating system group because POSIX functions ' . 'are not available to your PHP executable.' ) ; } if ( false === $ gid = \ filegroup ( $ filename ) ) { throw new \ Exception ( 'Could not get the group of the file "' . $ filename . '".' ) ; } return new Group ( $ gid ) ; }
Factory method to get the group of a file.

@param string    $filename

@return Group

@throws PosixNotAvailableException
@throws \Exception
Factory method to get the group of a file .