Gets a writable pathname

Share:

Description

Gets a writable pathname.

Usage

1
2
3
4
5
6
7
8
## Static method (use this):
## Arguments$getWritablePathname(..., mustExist=FALSE, mustNotExist=FALSE, mkdirs=TRUE,
##   maxTries=5L)

## Don't use the below:
## S3 method for class 'Arguments'
getWritablePathname(static, ..., mustExist=FALSE, mustNotExist=FALSE, mkdirs=TRUE,
  maxTries=5L)

Arguments

...

Arguments passed to *getReadablePathname().

mustExist

If TRUE and the pathname does not exists, an Exception is thrown, otherwise not.

mustNotExist

If the file exists, and mustNotExist is TRUE, an Exception is thrown. If the file exists, and mustNotExist is FALSE, or the file does not exists, the pathname is accepted.

mkdirs

If TRUE, mustNotExist is FALSE, and the path to the file does not exist, it is (recursively) created.

maxTries

A positive integer specifying how many times the method should try to create a missing directory before giving up. For more details, see mkdirs.

Value

Returns a character string of the pathname of the file. If the argument was invalid an Exception is thrown.

Missing values

If any argument in ... is NA, an exception is thrown.

Author(s)

Henrik Bengtsson

See Also

*getReadablePathname(). filePath. mkdirs. For more information see Arguments.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.