makefullpath {ramwas} | R Documentation |
Combine a path with a filename into filename with path.
makefullpath(path, filename)
path |
Path, relative to which the filename is expected to be.
Can be absolute, relative, or |
filename |
Can be just filename, include relative path, or include absolute path. |
Function returns filename
if it includes absolute path or
if path
is NULL
.
Filename with the path included.
Andrey A Shabalin andrey.shabalin@gmail.com
See also isAbsolutePath
.
makefullpath("dir1/dir2", "file.txt") # "dir1/dir2/file.txt" makefullpath("dir1/dir2", "dir3/file.txt") # "dir1/dir2/dir3/file.txt" # Path is ignored if the filename already includes absolute path makefullpath("dir1/dir2", "/file.txt") # "/file.txt" makefullpath("dir1/dir2", "C:/file.txt") # "C:/file.txt"