Suppose we have a function $f : \mathbb{R}^n \to \mathbb{R}$, such that for all differentiable paths ${\bf p} : [-1, 1] \to \mathbb{R}^n$ with ${\bf p}(0) = {\bf 0}$, the function $(f\circ{\bf p})$ is differentiable at $0$.
This amazing answer shows that such a function $f$ that is not (Fréchet-)differentiable at ${\bf 0}$ exists. The example given lacks the condition that for a differentiable function at a point, the directional derivatives depend linearly on the direction.
Now I know that even if all directional derivatives exist at a point and they are a linear function of the direction, the function might still not be differentiable there.
My question is, what if we add the condition that for all the smooth* paths ${\bf p}$, $(f\circ{\bf p})'(0) = \nabla f({\bf 0})\cdot{\bf p}'(0)$?
Now, I can write a proof but I'm not sure this is right. This answer claims that for a function $f : \mathbb{R}^n \to \mathbb{R}$, the statement $\lim_{\bf h\to 0} f({\bf h}) = L$ is equivalent to $\lim_{t\to 0} f({\bf g}(t)) = L$ for all smooth paths ${\bf g} : [-1, 1] \to \mathbb{R}^n, \lim_{t\to 0} {\bf g}(t) = {\bf 0}$ (Actually the interval in that answer is $[0, 1]$ but I don't think that matters, and they only consider the case $n=2$, but it seems like it can be easily generalised).
Consider the function $F : \mathbb{R}^n \to \mathbb{R}$, $F({\bf h}) = \frac{|f({\bf h}) - f({\bf 0}) - \nabla f({\bf 0}) \cdot {\bf h}|}{|{\bf h}|}$. According to the argument I made before, if indeed $(f\circ{\bf p})'(0) = \nabla f({\bf 0})\cdot p'(0)$ for all smooth paths ${\bf p}$ with ${\bf p}(0) = {\bf 0}$, then, after a bit of fiddling with limits, $F({\bf p}(t)) \to 0$ as $t\to 0$, so $F({\bf h})\to 0$ as ${\bf h}\to{\bf 0} \iff f$ is differentiable at ${\bf 0}$.
*By smooth path I mean a path of class $C^n$ where $n$ is as high as needed. For this question, it seems like the bare minimum is that the path is differentiable or even differentiable at just at $0$.