file_line_endings: Retrieve the type of line endings used by a file

Description Usage Arguments Value Examples

View source: R/file_line_endings.R

Description

Retrieve the type of line endings used by a file

Usage

1

Arguments

path

A character string of the path to the file to read.

Value

The line endings used, one of

Examples

1
2
3
4
5
6
7
8
9
tf1 <- tempfile()
tf2 <- tempfile()
write_lines("foo", tf1, eol = "\n")
write_lines("bar", tf2, eol = "\r\n")

file_line_endings(tf1)
file_line_endings(tf2)

unlink(c(tf1, tf2))

brio documentation built on Dec. 11, 2021, 10:09 a.m.