src/Filter.php
public function isCorrectType($type, $path)
	{
		if ( ! $type)
		{
			return true;
		}

		if ( ! isset($this->typeCache[$path]))
		{
			$this->typeCache[$path] = is_file($path) ? 'file' : 'dir';
		}

		return $this->typeCache[$path] === $type;
	}
public function isCorrectType($type, $path)
	{
		if ( ! $type)
		{
			return true;
		}

		if ( ! isset($this->typeCache[$path]))
		{
			$this->typeCache[$path] = is_file($path) ? 'file' : 'dir';
		}

		return $this->typeCache[$path] === $type;
	}
public function isCorrectType ( $ type , $ path ) { if ( ! $ type ) { return true ; } if ( ! isset ( $ this -> typeCache [ $ path ] ) ) { $ this -> typeCache [ $ path ] = is_file ( $ path ) ? 'file' : 'dir' ; } return $ this -> typeCache [ $ path ] === $ type ; }
Checks wether an path is of the correct type, dir or file

@param string $type
@param string $path

@return boolean
Checks wether an path is of the correct type dir or file