If the only systems running Perl were Unix, Dos, or Mac this would be easy: all I would need to do is canonize the two paths and then compare them as strings.Considering that Unix allows symbolic links, and mounts anywhere on the current filesystem (not to mention the fact that things can be mounted more than once), this is not as easy as you may think.
For example, if A is a substring of B, then A is the parent of B.Yes, but the reverse isn't true. If A isn't a substring of B, then that doesn't mean A isn't the parent of B.
In reply to Re: How does compare the relationship between two file system paths in a portable way?
by JavaFan
in thread How does one compare the relationship between two file system paths in a portable way?
by ELISHEVA
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |