add option to specify stat function for dir. snapshot
undeprecate stat_info