write_file: Write data to a file

View source: R/write_file.R

write_fileR Documentation

Write data to a file

Description

This function differs from write_lines() in that it writes the data in text directly, without any checking or adding any newlines.

Usage

write_file(text, path)

Arguments

text

A character vector of length 1 with data to write.

path

A character string giving the file path to write to.

Value

The UTF-8 encoded input text (invisibly).

Examples

tf <- tempfile()

write_file("some data\n", tf)

unlink(tf)

brio documentation built on May 29, 2024, 6:41 a.m.