• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/file.php
  • Класс: CWebDavFile
  • Вызов: CWebDavFile::_mimetype
function _mimetype($fspath)
{
	$io = self::GetIo();
	if ($io->DirectoryExists($fspath))
	{
		return 'httpd/unix-directory';
	}
	else if (function_exists('mime_content_type') && $io->FileExists($fspath))
	{
		$mime_type = mime_content_type(CBXVirtualIoFileSystem::ConvertCharset($fspath));
	}

	if (empty($mime_type))
	{
		$mime_type = $this->get_mime_type($fspath);
	}

	return $mime_type;
}