add directory read func