A generalized heat conduction solution for ultrafast laser heating in metallic films