src/fs/entity/FileEntity.php
public function hasExtension(string $extension): bool
    {
        $test = $this->getExtension();
        return (strcasecmp($extension, $test) === 0);
    }
public function hasExtension(string $extension): bool
    {
        $test = $this->getExtension();
        return (strcasecmp($extension, $test) === 0);
    }
Determine if the entity has a given extension

@param string $extension
@return bool