This question came to me while reading "Model Categories and their Localization", specifically the definition of path object in a general model category.
Given a topological space $X$, we have a homotopy equivalence $c:X\rightarrow X^I$, where $X^I$ is the space of maps $I=[0,1]\rightarrow X$, sending a point $x$ to the constant path with value $x$. I think $c$ is not a cofibration (in general) and I tried to prove it by showing that $c$ doesn't have the homotopy extension property, since it is a characterization of cofibrations, but haven't made much progress in this direction. Any hint or reference on whether or not my claim is true would be greatly appreciated.
A related question, if the above claim ($c$ is not a cofibration) is true, would be: Is there a characterization of those spaces $X$ such that $c$ is indeed a cofibration? Discrete spaces satisfy the condition, since $X^I$ is homeomorphic via $c$ to $X$ itself, are these the only ones?