public function getMime()
    {
        $this->absolute();

        //mime_content_type seems to be deprecated in some versions of PHP
        //if it does exist then lets use it
        if (function_exists('mime_content_type')) {
            return mime_content_type($this->data);
        }

        //if not then use the replacement funciton fileinfo
        //see: http://www.php.net/manual/en/function.finfo-file.php
        if (function_exists('finfo_open')) {
            $resource = finfo_open(FILEINFO_MIME_TYPE);
            $mime = finfo_file($resource, $this->data);
            finfo_close($finfo);

            return $mime;
        }

        //ok we have to do this manually
        //get this file extension
        $extension = strtolower($this->getExtension());

        //get the list of mimetypes stored locally
        $types = self::$mimeTypes;
        //if this extension exissts in the types
        if (isset($types[$extension])) {
            //return the mimetype
            return $types[$extension];
        }

        //return text/plain by default
        return $types['class'];
    }