index: implement all the file types for toString()