Gets a writable pathname

Gets a writable pathname.

methods, internal, IO
Arguments$getWritablePathname(..., mustExist=FALSE, mustNotExist=FALSE, mkdirs=TRUE, maxTries=5)
Arguments passed to *getReadablePathname().
If TRUE and the pathname does not exists, an Exception is thrown, otherwise not.
If the file exists, and mustNotExist is TRUE, an Exception is thrown. If the file exists, and mustNotExist is FAL
If TRUE, mustNotExist is FALSE, and the path to the file does not exist, it is (recursively) created.
A positive integer specifying how many times the method should try to create a missing directory before giving up.

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


getWritablePathname.Arguments(static, ..., mustExist=FALSE, mustNotExist=FALSE, mkdirs=TRUE, maxTries=5)

Missing values

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

Slow file systems

On very rare occassions, we have observed on a large shared file system that if one tests for the existance of a directory immediately after creating it with dir.create(), it may appear not to be created. We believe this is due to the fact that there is a short delay between creating a directory and that information being fully propagated on the file system. To minimize the risk for such false assertions on "slow" file systems, this method tries to create a missing directory multiple times (argument maxTries) (while waiting a short period of time between each round) before giving up.

See Also

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

  • getWritablePathname.Arguments
  • Arguments.getWritablePathname
  • getWritablePathname.Arguments
  • getWritablePathname,Arguments-method
Documentation reproduced from package R.utils, version 1.19.3, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.