recomposePath-DecomposedPath.S3-method: Recompose Path

Description Usage Arguments Value Author(s) References See Also Examples

Description

See recomposePath.

Usage

1
2
## S4 method for signature 'DecomposedPath.S3'
recomposePath(path, shortform = FALSE, ...)

Arguments

path

DecomposedPath.S3. Decomposed path object as returned by decomposePath.

shortform

logical. Dimension: 1. TRUE means the short forms for getwd() (i.e. ".", dirname(getwd() (i.e. ".." and HOME (i.e. "~") are used, FALSE means they are not used.

...

Further arguments to be passed to subsequent functions/methods.

Value

character. Vector of paths (directories and/or files).

Author(s)

Janko Thyson janko.thyson@rappster.de

References

https://github.com/Rappster/filesystr

See Also

recomposePath, decomposePath

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 

 path <- c(
  "dir_b/sub_1",
  "dir_b/sub_1/",
  "dir_b/sub_1/file.txt",
  "dir_b/sub_1/file.txt/",
  "dir_b/sub_1/notthere.txt",
  "dir_b/sub_1/notthere.txt/",
  "dir_b/noext",
  "dir_b/noext/",
  "dir_b/noext/file.txt",
  "dir_b/noext/file.txt/",
  "dir_b/noext/notthere.txt",
  "dir_b/noext/notthere.txt/"
)
path_dec <- decomposePath(path = path)
path_rec <- recomposePath(path = path_dec)
identical(path_rec, standardizePath(path))

path_rec <- recomposePath(path = path_dec, shortform = TRUE)
identical(path_rec, gsub("/$", "", path))


## End(Not run)

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