next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: relativizeFilename

relativizeFilename -- relativize a file name

Synopsis

Description

i1 : relativizeFilename("a/b/","a/b/c/d")

o1 = c/d
i2 : relativizeFilename("a/b/c/d","a/b/")

o2 = ../../
i3 : relativizeFilename("a/b/c/d","a/b/e/f")

o3 = ../../e/f

Paths of the form foo/x/../bar, are shortened to foo/bar without checking the file system to see whether x is a symbolic link. For the other behavior, see realpath.

See also