# NOT RUN {
# Default
print(file.path("foo", "bar", "..", "name")) # "foo/bar/../name"
# Shorten pathname, if possible
print(filePath("foo", "bar", "..", "name")) # "foo/name"
print(filePath("foo/bar/../name")) # "foo/name"
# Recognize Windows Shortcut files along the path, cf. Unix soft links
filename <- system.file("data-ex/HISTORY.LNK", package="R.utils")
print(filename)
filename <- filePath(filename, expandLinks="relative")
print(filename)
# }
Run the code above in your browser using DataLab