reactiveDirReader: reactiveDirReader

View source: R/utils_reactiveDirReader.R

reactiveDirReaderR Documentation

reactiveDirReader

Description

Function adapted from reactivePoll(). Used to create a reactive data source, which works by periodically polling a directory of non-reactive data sources.

Usage

files_poll <- reactiveDirReader(path, session, pattern, full_names = FALSE,
intervalMillis = 1000)

Arguments

repo

(character) Path of the target directory to poll.

session

The user session to associate this file reader with, or NULL if none. If non-null, the reader will automatically stop when the session ends.

pattern

(character) an optional regular expression. Only file names which match the regular expression will be returned.

full_names

(logical) a logical value. If TRUE, the directory path is prepended to the file names to give a relative file path. If FALSE, the file names (rather than paths) are returned.

intervalMillis

(integer) Approximate number of milliseconds to wait between calls to checkFunc. This can be either a numeric value, or a function that returns a numeric value.

Value

A reactive returning the files contained in the target repository. If folders are returned, their content won't be detailed. If no file is to be found, only returns "No files found." through validate().


earnaud/MetaShARK-v2 documentation built on Sept. 21, 2022, 10:52 a.m.