getParentDirectory: Get Path of Parent Directory

Description Usage Arguments Author(s) References See Also Examples

Description

Gets the path of a directorie's parent directory. Argument up controls how many levels to go up relative to the initial directory.

Usage

1
getParentDirectory(path, up = 1, ...)

Arguments

path

Signature argument. Object containing path information.

up

numeric. Dimension: 1 Number of levels to go up (relative to the initial directory).

...

Further arguments to be passed to subsequent functions/methods.

Author(s)

Janko Thyson janko.thyson@rappster.de

References

https://github.com/Rappster/filesystr

See Also

getParentDirectory, getParentDirectory-character-method

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 

path <- c(getwd(), R.home())

getParentDirectory(path = path)
getParentDirectory(path = path, up = 2)
getParentDirectory(path = path, up = 3)
getParentDirectory(path = path, up = c(1,4))

path <- "c:/Windows"
getParentDirectory(path = path, up = 2)
try(getParentDirectory(path = path, up = 3))


## End(Not run)

rappster/filesystr documentation built on May 26, 2019, 11:17 p.m.