Description Usage Arguments Details Value Examples
Creates a flow object that watches one or more files
1 | flow_file_source(file_path, flow_options = get_flow_options())
|
file_path |
A (named) vector of file paths to be watched or a
|
flow_options |
List of options created using |
This flow object does not throw an error if the file_path
is missing,
but it changes its state. Hence, it can be used to trigger a downstream
flow object if the file is now present, changed or missing.
The flow object.
1 2 3 4 5 6 7 8 9 10 | # write for the first time content in file and create flow
file_temp <- tempfile(pattern = "example_source")
write.csv(head(mtcars), file_temp, row.names = FALSE)
rflow_source <- flow_file_source(file_temp)
# write other content in the same file
# now the flow object will update its state
write.csv(tail(mtcars), file_temp, row.names = FALSE)
rflow_source <- flow_file_source(file_temp)
unlink(file_temp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.