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);
    }