| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/path.R |
| 3 |
\name{path_filter} |
| 4 |
\alias{path_filter} |
| 5 |
\title{Filter paths} |
| 6 |
\usage{ |
| 7 |
path_filter(path, glob = NULL, regexp = NULL, invert = FALSE, ...) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{path}{A character vector of one or more paths.} |
| 11 |
|
| 12 |
\item{glob}{A wildcard aka globbing pattern (e.g. \verb{*.csv}) passed on to \code{\link[=grep]{grep()}} to filter paths.} |
| 13 |
|
| 14 |
\item{regexp}{A regular expression (e.g. \verb{[.]csv$}) passed on to \code{\link[=grep]{grep()}} to filter paths.} |
| 15 |
|
| 16 |
\item{invert}{If \code{TRUE} return files which do \emph{not} match} |
| 17 |
|
| 18 |
\item{...}{Additional arguments passed to \link{grep}.} |
| 19 |
} |
| 20 |
\description{ |
| 21 |
Filter paths |
| 22 |
} |
| 23 |
\examples{ |
| 24 |
path_filter(c("foo", "boo", "bar"), glob = "*oo") |
| 25 |
path_filter(c("foo", "boo", "bar"), glob = "*oo", invert = TRUE) |
| 26 |
|
| 27 |
path_filter(c("foo", "boo", "bar"), regexp = "b.r") |
| 28 |
} |