list_files | R Documentation |
base::list.files()
that adds an option to exclude directories
automatically.list.files returns all objects in the search path including directories.
list_files
is a wrapper that adds an option to exclude directories. In specific,
it allows the user to override the default behavior of list.files()
including
subdirectory names when recursive
is set to FALSE. This is controlled by the
incl_dirs
argument which filters our directories when set to TRUE.
list_files(path = ".", pattern = NULL, all.files = FALSE, full.names = TRUE,
recursive = FALSE, ignore.case = FALSE, include.dirs = FALSE, no.. = FALSE,
incl_dirs = FALSE)
path |
a character vector of full path names; the default
corresponds to the working directory, |
pattern |
an optional regular expression. Only file names which match the regular expression will be returned. |
all.files |
a logical value. If |
full.names |
a logical value. If |
recursive |
logical. Should the listing recurse into directories? |
ignore.case |
logical. Should pattern-matching be case-insensitive? |
include.dirs |
logical. Should subdirectory names be included in recursive listings? (They always are in non-recursive ones). |
no.. |
logical. Should both |
incl_dirs |
(binary, optional) set to FALSE to remove all directories from
the search results irrespective of whether or not |
list.files for documentation regarding all other arguments.
## Not run:
#Input data
inpath <- dirname(system.file("extdata", "cdsearchr_testdata.fasta",
package = "seqvisr", mustWork = TRUE))
#Listing files
list_files(inpath)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.