standardizePath: Standardize Path

Description Usage Arguments Author(s) References See Also Examples

Description

Standardizes paths of file system ressources.

Usage

1
standardizePath(path = ".", sep = c("/", "\\"), shortform = FALSE, ...)

Arguments

path

Signature argument. Object containing path information.

sep

character. String separator betwen directory levels in the output.

shortform

logical. Dimension: 1. Use shortforms (TRUE) for getwd() (i.e. ".", dirname(getwd() (i.e. ".." and HOME (i.e. "~") or not (FALSE, default).

...

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

standardizePath-character-method

Examples

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

standardizePath()

path <- c(".", "./dir", "..", "../dir", "~", "~/file.txt", R.home(), 
            tempdir(), "nonex", "nonex/", "nonex/file.txt", 
            "nonex/file.txt/", "", NA)
standardizePath(path = path, sep = "\\")
try(standardizePath(path = path, sep = "notallowed"))
standardizePath(path = path, shortform = TRUE)

standardizePath(".")
standardizePath(path = character())
standardizePath(path = "")
standardizePath(path = NA_character_)


## End(Not run)

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