Arguments$getFilename

0th

Percentile

Gets and validates a filename

Gets and validates a filename.

Keywords
methods, internal
Usage
## Static method (use this):
## Arguments$getFilename(filename, nchar=c(1, 128), class=c("safe"), .name=NULL,
##   .type="filename", ...)

## Don't use the below: ## S3 method for class 'Arguments': getFilename(static, filename, nchar=c(1, 128), class=c("safe"), .name=NULL, .type="filename", ...)

Arguments
filename
A character string.
nchar
An integer vector of length two specifying the range of valid filename lengths.
class
A character string specifying the class of valid filenames.
.name
The name of the argument validated.
.type
Not used.
Details

When argument class="safe", the following 86 ASCII characters are allowed in filenames: #$ @ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_ (31) `abcdefghijklmnopqrstuvwxyz{|}~ (31) This class of filenames has been extensively tested on for cross-platform support on Microsoft Windows, OSX and various Unix flavors.

Value

  • Returns a character string if filename is valid, otherwise an exception is thrown.

References

[1] Microsoft, Naming Files, Paths, and Namespaces (Section 'Windows Naming Conventions'), 2012. http://msdn.microsoft.com/en-us/library/aa365247.aspx#naming_conventions.

See Also

For more information see Arguments.

Aliases
  • Arguments$getFilename
  • getFilename.Arguments
  • Arguments.getFilename
  • getFilename,Arguments-method
Documentation reproduced from package R.utils, version 1.28.4, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.