You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mathias Reem <m....@gmx.net> on 2009/03/16 23:03:25 UTC

Checking if resource "type" exists

Hi

I've been searching for a while for a way to not just determine whether
a resource exists but also if the resource has a specific type (dir,
file, hidden).

As I could not find anything, I wanted to extend the default
ResourceExistsSelector, but as all of its members are private without
any getters or setters I just had to c&p it. :-( Anyway maybe it can be
useful for somebody else too.

You can use my ResourceExistsSelector as a drop in replacement for the
default, it will behave exactly the same way. I've you want to further
restrict the "type" of the resource you just have to pass a parameter
named type to the selector.

Have fun.
	Mathias