get to know the real path of given file
Filepath:
/a/b/c/d/e/f
/x/y/z
Only have the following information:
fileID filename parentID
1 a 0
2 b 1
3 c 2
4 d 3
5 e 4
6 f 5
7 x 0
8 y 7
9 z 8
.....
Q:How to print out the real path?for example
c -> /a/b/c
d -> /a/b/c/d
y -> /x/y
can anyone provide some codes to this example?I was really scratching my head for some days.