Skip to contents

This function writes an object of class fnames to a text file. Each filename is written in a separate line. The file encoding is always "UTF-8". In addition, it can store metadata in an additional configuration file.

Usage

write_fnames(x, file, ...)

Arguments

x

Object of class fnames.

file

Path to output file.

...

Additional arguments (not implemented).

Value

Invisibly, x.

See also

Examples

.old_wd <- setwd(tempdir())
cwd_fnames <- as_fnames(c("file1.txt", "file2.txt"))
write_fnames(cwd_fnames, "file_with_filenames.txt")
cwd_fnames_2 <- read_fnames("file_with_filenames.txt")
setwd(.old_wd)