EVOLUTION-MANAGER
Edit File: edit_file.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: Open file for editing</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 edit_file {usethis}"><tr><td>edit_file {usethis}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Open file for editing</h2> <h3>Description</h3> <p>Opens a file for editing in RStudio, if that is the active environment, or via <code><a href="../../utils/html/file.edit.html">utils::file.edit()</a></code> otherwise. If the file does not exist, it is created. If the parent directory does not exist, it is also created. <code>edit_template()</code> specifically opens templates in <code>inst/templates</code> for use with <code><a href="use_template.html">use_template()</a></code>. </p> <h3>Usage</h3> <pre> edit_file(path, open = rlang::is_interactive()) edit_template(template = NULL, open = rlang::is_interactive()) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>path</code></td> <td> <p>Path to target file.</p> </td></tr> <tr valign="top"><td><code>open</code></td> <td> <p>Whether to open the file for interactive editing.</p> </td></tr> <tr valign="top"><td><code>template</code></td> <td> <p>The target template file. If not specified, existing template files are offered for interactive selection.</p> </td></tr> </table> <h3>Value</h3> <p>Target path, invisibly. </p> <h3>Examples</h3> <pre> ## Not run: edit_file("DESCRIPTION") edit_file("~/.gitconfig") ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>usethis</em> version 2.1.6 <a href="00Index.html">Index</a>]</div> </body></html>