allow dir resource to specify a mapper (for filename mapping)