support iterator when filtering files by attribute