file_stream: Create a stream of files

View source: R/stream-file.R

file_streamR Documentation

Create a stream of files

Description

Optionally, setup a locker storage space on disk with a specific file format (e.g. fst or feather).

Usage

file_stream(n, locker = NULL, format = NULL, where = NULL, ...)

Arguments

n

The number of file names to generate; must be a single numeric value greater than or equal to 1.

locker

Passed to setup_locker() as dir; important to note that the directory will be unlinked if it exists and is an established locker directory.

format

Passed to format_stream().

where

An optional file path; this is replaced by locker if it is also passed.

...

Additional arguments passed to file_set().

Details

Pass locker to set up locker space for saving outputs; this involves clearing the locker directory (see setup_locker() for details). Passing locker also sets the path for output files. If you want to set up the path for output files without setting up locker space, pass where.

See Also

format_stream(), locate_stream(), ext_stream(), new_stream(), file_set()

Examples

x <- file_stream(3, locker = temp_ds("foo"), format = "fst")
x[[1]]


mrgsim.parallel documentation built on March 18, 2022, 7:52 p.m.