Description Usage Arguments Details Examples
This function checks whether a directory in a given path exists and creates it - including any missing directories in the path - if that is not the case.
1 | create_dir(dir, fullPath = F)
|
dir |
A character string defining the path to the directory that should be created |
fullPath |
A boolean flag indicating whether the directory string
provided is a full path or not. If |
This function is generally useful in the setup process of any (part of a) project where the existence of a specific directory is dependent on the first execution of a related part of your code base.
1 2 3 4 5 6 | create_dir('my/export/directory')
create_dir('~/my/export/directory', TRUE)
# using the get_file_path() function in jaytools
create_dir(get_file_path('my/export/directory'), TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.