add dirIndex support