How do you find the relative path?
Answer
5 Answers
Answer
5 Answers
- start by finding the longest common prefix which ends with a path-separator.
- if there is no common prefix, you are done.
- strip the common prefix from (a copy of…) the current and target strings.
- replace each directory-name in the current string with “..”