influxr_list_files: List files in a directory

influxr_list_filesR Documentation

List files in a directory

Description

influxr_list_files (recursively) list all files in a directory that names match criteria.

Usage

influxr_list_files(
  path = ".",
  pattern = "*",
  pattern_exclude = NULL,
  grep_path = FALSE,
  recursive = FALSE,
  min_size = 0,
  max_size = Inf,
  skip = 0,
  from = NULL,
  to = NULL,
  file_mtime = c("mtime", "filename"),
  mtime_format = NULL,
  nfiles = Inf,
  auto_skip_processed = FALSE,
  verbose = FALSE,
  ...
)

Arguments

path

character. Path to the directory.

pattern

character. String pattern (regex) used for selecting files for upload. If pattern is a character vector of length > 1, its elements are connected with a logical AND, i.e., all elements must match to select a file for upload.

pattern_exclude

character or NULL. If character, it is taken as the filename string pattern used for deselecting files for upload. If pattern_exclude has a length > 1, its elements are connected with a logical OR, i.e., one matching element is sufficient to deselect a file for upload. If NULL, no deselection based on filename takes place.

grep_path

logical. If TRUE, the whole file path will be considered when selecting files based on pattern and pattern_exclude. If FALSE, only the filename will be considered when selecting files based on pattern and pattern_exclude.

recursive

logical. Should the directory be searched recursively?

min_size

numeric. Minimum size of files to be selected for upload in bytes.

max_size

numeric. Maximum size of files to be selected for upload in bytes.

skip

numeric. Number of files to skip. Indexing is done according to list.files(..., full.names = TRUE).

from

POSIXt data time object. If not NULL file list will be subsetted based on file modification time (mtime), and files will which have a i timestamp same as or newer than from will be kept.

to

POSIXt data time object. If not NULL file list will be subsetted based on file modification time (mtime), and files will which have a timestamp older than from will be kept.

mtime_format

Format of modification time.

nfiles

integer. Maximum number of files to process.

auto_skip_processed

logical. When TRUE influxr_list_files will compare the listed files against upload status file created by influxr_upload_files funtion and will skip files that have been processed and their modification time haven't changed. To use this feature store_status_locally argument has to be enabled when using influxr_upload_files function.

mtime

logical or character. If TRUE, data selection is based on file modification time (mtime). If character, it is used as the format string for converting the filename to POSIXt on which data selection is based. In both cases, from and to specify the data selection time limits. If FALSE, data selection is not based on file modification time or filename timestamp.

verbose.

Whether to print output messages.


influxr/influxr documentation built on May 1, 2024, 2:07 a.m.