added datadir_t style resource handling