[core] generate a file index