Floyd-Warshall computes distances but not the actual paths. To reconstruct paths, maintain a array next[i][j]. Initialize next[i][j] = j if there is a direct edge from to . When you improve dist[i][j] via vertex , set next[i][j] = next[i][k].
After the algorithm, follow next pointers to reconstruct the path from to . This adds space but allows you to output the actual path, not its length.
Space complexity is for the data structures used.