write_lines: Write lines to file

View source: R/schema.R

write_linesR Documentation

Write lines to file

Description

Normalizes path, check if directory exists, creates it if necessary, writes lines to file, and checks if file was created successfully.

Usage

write_lines(x, file, overwrite = FALSE, verbosity = 1L)

Arguments

x

Character: Text to write to file.

file

Character: Path to output file.

overwrite

Logical: If TRUE, overwrite an existing file.

verbosity

Integer: Verbosity level.

Value

Invisible NULL. Called for the side effect of writing to file.

Author(s)

EDG

Examples

tmpfile <- file.path(tempdir(), "demo.txt")
write_lines("hello", tmpfile, overwrite = TRUE, verbosity = 0L)

rtemis.core documentation built on Sept. 20, 2026, 9:06 a.m.