Returns a raw mime-dir representation of the value.

@return string
423047
public function getRawMimeDirValue()
    {
        $val = $this->getParts();

        if (isset($this->minimumPropertyValues[$this->name])) {
            $val = array_pad($val, $this->minimumPropertyValues[$this->name], '');
        }

        foreach ($val as &$item) {
            if (!is_array($item)) {
                $item = [$item];
            }

            foreach ($item as &$subItem) {
                $subItem = strtr(
                    $subItem,
                    [
                        '\\' => '\\\\',
                        ';' => '\;',
                        ',' => '\,',
                        "\n" => '\n',
                        "\r" => '',
                    ]
                );
            }
            $item = implode(',', $item);
        }

        return implode($this->delimiter, $val);
    }
102510
private function cacheDirectory(): string
    {
        $cacheDirectory = (string) $this->cacheDirectory;

        if ('' === $cacheDirectory && false === \is_writable($cacheDirectory))
        {
            $cacheDirectory = \sys_get_temp_dir();
        }

        return \rtrim($cacheDirectory, '/');
    }
1031550
public function getMime()
    {
        $mimes = $this->getMimes();
        $ext = strtolower($this->getExtension());

        if (isset($mimes[ $ext ])) {
            return $mimes[ $ext ];
        }

        return false;
    }
982566
public function toString()
	{
		if ( $this->test() )
		{
			if ( class_exists('\\Imagick') )
				$m = $this->img;
			else
			{
				ob_start();
				\call_user_func('image'.$this->ext2,$this->img);
				$m = ob_get_contents();
				ob_end_clean();
			}
			return 'data:image/'.$this->ext.';base64,'.base64_encode($m);
		}
	}
907412
public function getRawMessage(): string
    {
        if (null === $this->rawMessage) {
            $this->rawMessage = $this->doGetContent('');
        }

        return $this->rawMessage;
    }
107652
public function dir()
	{
		$dir = clone $this;
		if ($this->lastPart === '') {
			// already dir
		} else if ($this->lastPart === '..' || $this->lastPart === '.') {
			$dir->parts[] = '';
		} else {
			array_pop($dir->parts);
			$dir->parts[] = '';
		}
		$dir->setParts($dir->parts);
		return $dir;
	}
1284425
public function getUri(): string
    {
        $tts = new TextToSpeechHandler($this->text, $this->provider);

        $filename = $tts->generateFilename();

        if (!$this->directory->has($filename)) {
            $data = $tts->getAudioData();
            $this->directory->write($filename, $data);
        }

        return "x-file-cifs://" . $this->directory->getSharePath() . "/{$filename}";
    }
673062
public function getBytes()
    {
        $result = '';
        foreach ($this->getChunks() as $chunk) {
            $result .= $chunk['data']->bin;
        }

        return $result;
    }
220373
protected function getInputFileWithoutExt()
    {
        $info = pathinfo($this->getView()->getInputFile());

        return $info['dirname']
            . DIRECTORY_SEPARATOR
            . ($info['filename']?:$info['basename']); // allow dot files
    }
295795
public function getDirectory()
    {
        $dir = clone $this;
        $dir->path = str_replace(DIRECTORY_SEPARATOR, '/', dirname($this->path));
        if (!$dir->path) $dir->path = '/';

        return $dir;
    }
126976
public function getMimeType(): string
    {
        $mimes = new MimeTypes();

        $type = $mimes->getMimeType($this->getAttribute('extension'));

        return $type ?? 'unknown';
    }
225015
protected function parseRaw($raw) {
		$info = preg_split("/\s+/", $raw, 9);
		$stat = array();

		$stat['name'] = join(" ", array_slice($info, 3, 9));
		$stat['read'] = true;
		if ($info[2] == '<DIR>')
		{
			$stat['size'] = 0;
			$stat['mime'] = 'directory';
		}
		else
		{
			$stat['size'] = $info[2];
			$stat['mime'] = $this->mimetype($stat['name']);
		}

		return $stat;
	}
1048186
public function getMimeType()
    {
        try {
            $mimeType = $this->getFileSystem()->getMimetype($this->getPrefix());
            if ($mimeType == 'text/plain' && substr($this->getPrefix(), -4) == '.css') {
                $mimeType = 'text/css';
            }
            return $mimeType;
        } catch (FileNotFoundException $e) {
        }
        return false;
    }
231720
public function getMimeType()
    {
        // return mime type ala mimetype extension
        $finfo = finfo_open(FILEINFO_MIME);

        $mime = finfo_file($finfo, $this->getFullPath());

        return $mime;
    }
572160
public function getContent(): string
    {
        $raw = '';
        foreach ($this->chunk(8192) as $chunk) {
            $raw .= $chunk;
        }

        return $raw;
    }
240424
public function toDataSchemeURI()
	{
		$md5 = md5(microtime(1).rand(10000, 99999));
		$filePath = $this->tempDirPath() . DIRECTORY_SEPARATOR . "temp".$md5.".png";
		$this->saveTo($filePath);
		
		$uri = 'data:' . mime_content_type($filePath) . ';base64,';
		$uri .= base64_encode(file_get_contents($filePath));
		
		unlink($filePath);
		
		return $uri;
	}
1180997
public function mime()
    {
        if (!$this->exists()) {
            return false;
        }
        if (class_exists('finfo')) {
            $finfo = new finfo(FILEINFO_MIME);
            $type = $finfo->file($this->pwd());
            if (!$type) {
                return false;
            }
            list($type) = explode(';', $type);

            return $type;
        }
        if (function_exists('mime_content_type')) {
            return mime_content_type($this->pwd());
        }

        return false;
    }