Add ::filename and make ::ext query-aware.