EVOLUTION-MANAGER
Edit File: file_line_endings.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Retrieve the type of line endings used by a file</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for file_line_endings {brio}"><tr><td>file_line_endings {brio}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Retrieve the type of line endings used by a file</h2> <h3>Description</h3> <p>Retrieve the type of line endings used by a file </p> <h3>Usage</h3> <pre> file_line_endings(path) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>path</code></td> <td> <p>A character string of the path to the file to read.</p> </td></tr> </table> <h3>Value</h3> <p>The line endings used, one of </p> <ul> <li><p> '\n' - if the file uses Unix line endings </p> </li> <li><p> '\r\n' - if the file uses Windows line endings </p> </li> <li><p> NA - if it cannot be determined </p> </li></ul> <h3>Examples</h3> <pre> 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)) </pre> <hr /><div style="text-align: center;">[Package <em>brio</em> version 1.1.3 <a href="00Index.html">Index</a>]</div> </body></html>