src/CarteBlanche/Library/File.php
public function guessExtension()
    {
        $_ext = $this->getExtension();
        if (empty($_ext) && $this->getRealPath()) {
            $finfo = new \finfo();
            $mime = $finfo->file( $this->getRealPath(), FILEINFO_MIME_TYPE );
            $_ext = str_replace('image/', '', $mime);
        }
        return $_ext;
    }
public function guessExtension()
    {
        $_ext = $this->getExtension();
        if (empty($_ext) && $this->getRealPath()) {
            $finfo = new \finfo();
            $mime = $finfo->file( $this->getRealPath(), FILEINFO_MIME_TYPE );
            $_ext = str_replace('image/', '', $mime);
        }
        return $_ext;
    }
Get the file extension or guess it from MIME type if so ...

@return  string  The guessed extension
@see     \SplFileInfo::getExtension()