Type.

@param string $path
@return string
339132
public static function type(string $path): string
    {
        $result = @filetype($path);
        return $result !== false ? $result : '';
    }
209705
public function link(String $path) : String
    {
        if( ! IS::url($path) )
        {
            $path = Request::getBaseURL(Base::suffix($path, '.css'));
        }

        $attributes['href'] = $path;
        $attributes['rel']  = 'stylesheet';
        $attributes['type'] = 'text/css';

        return $this->_singleElement('link', $attributes);
    }
1117525
private function getPath($path)
    {
        if ($this->basePath === '' || strpos($path, $this->basePath) === 0) {
            $path = substr($path, strlen($this->basePath)) ?: '';
        }

        return $path === '' ? '/' : $path;
    }
520686
protected function get_pathfor($path = '') {
        $path = trim($path, '/') !== '' ? '/' . trim($path, '/') : '';
        return $this->connectionpoint->get_path() . '/' .
               'plugin_' . $this->plugintype . '_' .
               $this->pluginname . '_' . basename($this->connectionpoint->get_path()) . $path;
    }
1102189
private function getFullPath($type, $path)
    {
        return sprintf('%s/%s/%s', $this->config['web_root_dir'], $this->config[$type . '_path'], $path);
    }
760816
protected function makeSurePathIsAbsolute($path): string
    {
        $site_url = rtrim($this->getParameter('site_url'), '/') . '/';

        if (0 !== strpos($path, 'http')) {
            return $site_url . ltrim($path, '/');
        } else {
            return $path;
        }
    }
892156
private function getClassTypeStandarized( $path )
	{
		$class = '';

		$ctrl_parts = explode( '/', $path );

		while ( $class_name = array_shift( $ctrl_parts ) )
		{
			$class .= ucfirst( $class_name );
		}

		return $class;
	}
913358
protected function generateTypeNameFromPath($path)
    {
        $name = str_replace($this->getTypesDirectory(), '', $path);
        $name = str_replace('.php', '', $name);
        $name = trim($name, '\/');

        return str_replace(['/', '\\'], '\\', $name);
    }
485057
public static function mimetypeFile ($path)
		{
			$finfo = finfo_open(FILEINFO_MIME_TYPE);
			if ($finfo)
			{
				$info = finfo_file($finfo, $path);
				finfo_close($finfo);

				return $info;
			}

			return null;
		}
1148429
public function path($path = '')
    {
        $appPath = $this->appPath ?: $this->basePath.DIRECTORY_SEPARATOR.'app';

        return $appPath.($path ? DIRECTORY_SEPARATOR.$path : $path);
    }
517688
public function getMimetype($path)
    {
        $meta = $this->getMetadata($path);

        return isset($meta['ContentType'])
            ? ['mimetype' => $meta['ContentType']] : false;
    }
56519
public function mimeType($path)
    {
        if ($this->isDirectory($path)) {
            return static::$directoryMimetype;
        }
        return $this->mimeTypes->typeOfFile($path);
    }
1165500
protected function getPath($path)
	{
		$rootPath = $this->option('path');

		return $rootPath.'/'.strtolower($this->getTheme()).'/' . $path;
	}
665643
protected function prepare($path)
    {
        foreach ($this->paths as $type => $pathValue) {
            if ($pathValue instanceof pathmanager\FallbackInterface) {
                $pathValue = $pathValue->resolve('');
            }

            $path = str_replace('{{'.$type.'_dir}}', $pathValue, $path);
        }

        return $path;
    }
1231676
public function mimeType($path)
    {
        if ($this->isDirectory($path) || $path == '/') {
            return LocalFilesystem::$directoryMimetype;
        }
        return $this->mimeTypes->typeOfName($path);
    }
661235
protected function xType($path=null)
    {
        if (!$this->typeProvider) {
            throw new UnConfiguredException("No typeprovider setted");
        }

        if (!$resource = $this->resource()) {
            throw new UnConfiguredException("Without returning something in resource() I cant find a type");
        }

        return $this->typeProvider->xType($resource, $path);
    }
677078
public function get_content_type($path){
        if( file_exists($path) ){
            $info = finfo_open(FILEINFO_MIME);
            $type = finfo_file($info, $path) ;
            finfo_close($info);
            return $type ?: '' ;
        }else{
            return '';
        }
    }