public function getDirectory($name, $ext)
	{
		if ('' === $name = '/' . trim($name, '/.') . '/')
			return true;

		$type = $this->getTypeForExt($ext);

		foreach ($this->paths as $path)
		{
			$prefixes = isset($path['prefixes']) ? $path['prefixes'] : array();
			$prefix = isset($prefixes[$type]) ? $prefixes[$type] . '/' : '';
			
			foreach ($path['directories'] as $directory)
			{
				if (file_exists($directory) && is_dir($directory))
					return $directory;
			}
		}
		
		throw new Exception\DirectoryNotFound($name);
	}