Arguments$getFilename | R Documentation |
Gets and validates a filename.
## 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", ...)
filename |
A |
nchar |
An |
class |
A |
.name |
The name of the argument validated. |
.type |
Not used. |
... |
Not used. |
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, macOS, and various Unix flavors.
Returns a character
string if filename is valid,
otherwise an exception is thrown.
If filename
is a missing value, then an exception is thrown.
Henrik Bengtsson
[1] Microsoft, Naming Files, Paths, and Namespaces, 2018. https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file.
For more information see Arguments
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.