makefullpath {ramwas} | R Documentation

## Combine Path and Filename into Filename with Path

### Description

Combine a path with a filename into filename with path.

### Usage

    makefullpath(path, filename)

### Arguments

`path` | Path, relative to which the filename is expected to be. Can be absolute, relative, or `NULL`.
`filename` | Can be just filename, include relative path, or include absolute path.

### Details

Function returns `filename` if it includes absolute path or if `path` is `NULL`.

### Value

Filename with the path included.

### Author(s)

Andrey A Shabalin andrey.shabalin@gmail.com

### See Also

See also `isAbsolutePath`.

### Examples

    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"

[Package ramwas version 1.10.5 Index]