file_utils | R Documentation |
Opens the given files(s)
open_file(x)
file_open(x)
shell_exec(x)
list_files(
x = ".",
pattern = utils::glob2rx(glob),
glob = NULL,
ignore_case = FALSE,
all = FALSE,
negate = FALSE,
basename = FALSE
)
list_dirs(
x = ".",
pattern = NULL,
ignore_case = FALSE,
all = FALSE,
basename = FALSE,
negate = FALSE
)
x |
A character vector of paths |
pattern , glob |
Pattern to search for files. |
ignore_case |
logical. Should pattern-matching be case-insensitive? |
all |
a logical value. If FALSE, only the names of visible files are returned (following Unix-style visibility, that is files whose name does not start with a dot). If TRUE, all file names will be returned. |
negate |
Logical, if |
basename |
If |
open_file
is an alternative to shell.exec()
that can take take
multiple files. list_files
and list_dirs
are mostly wrappers for
fs::dir_ls()
with preferred defaults and pattern searching on the full file
path.
file_open
is simply an alias.
open_file()
, shell_exec()
: A logical vector where TRUE
successfully
opened, FALSE
did not and NA
did not try to open (file not found)
list_files()
, list_dirs()
: A vector of full paths
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.