Description Usage Arguments Value Note See Also Examples
A vectorized version of dir.create
, and
file.create
and unlink
with more
convenient defaults.
1 2 3 4 5 | create_dirs(x = temp_file(pattern = "dir"))
create_files(x = temp_file())
remove_dirs(x)
|
x |
A character vector of paths of directories to create/remove.
For |
A logical vector of successes of failures.
create_dirs
will only attempt to create directories that don't
already exist.
1 2 3 4 5 6 7 8 9 10 11 12 13 | dirs <- temp_dir(c("foo", "bar/baz"))
create_dirs(dirs)
# Check this worked:
assertive.files::assert_all_are_dirs(dirs)
files <- temp_dir("blah/blah/blah", LETTERS)
create_files(files)
assertive.files::assert_all_are_existing_files(files)
# Clean up
remove_dirs(temp_dir(c("foo", "bar", "blah")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.