I have a program that takes a relative path as input appends it to a some path string to get the actual path.
Now all I can input is the relative path. So if I want to go one level above my input will be ../mypath
.
If I know the depth of the path used internally, I can use ..
as many times to go to the root directory and then give the absolute path. But suppose I do not know the depth of the directory, can I construct a relative path string such that it considers it as a relative path. One way could be to have enough ..
in the path string so that I can force an absolute path for some maximum depth of path.
Is there some path string syntax that I am not aware of but can achieve this?