Also we know that, the First Law of Thermodynamics says:
(For a process) dQ = dW, or dQ = dE + Dw; where dQ=Heat energy transferred, dW=work done, dE=energy loss(chnage in Kinetic Energy, Potential energy etc). thus Heat transfer follows a path and Hence a Path Function.