Alex\BehatLauncher\Behat\OutputFile::getMimetype PHP Method

getMimetype() public method

public getMimetype ( ) : string
return string
    public function getMimetype()
    {
        $finfo = new \finfo(FILEINFO_MIME);
        if (!$this->exists()) {
            throw new \LogicException(sprintf('Path "%s" does not exist.', $this->path ?: '*none*'));
        }
        return $finfo->file($this->path);
    }