EVOLUTION-MANAGER
Edit File: create.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: Create files, directories, or links</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 create {fs}"><tr><td>create {fs}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Create files, directories, or links</h2> <h3>Description</h3> <p>The functions <code>file_create()</code> and <code>dir_create()</code> ensure that <code>path</code> exists; if it already exists it will be left unchanged. That means that compared to <code><a href="../../base/html/files.html">file.create()</a></code>, <code>file_create()</code> will not truncate an existing file, and compared to <code><a href="../../base/html/files2.html">dir.create()</a></code>, <code>dir_create()</code> will silently ignore existing directories. </p> <h3>Usage</h3> <pre> file_create(path, ..., mode = "u=rw,go=r") dir_create(path, ..., mode = "u=rwx,go=rx", recurse = TRUE, recursive) link_create(path, new_path, symbolic = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>path</code></td> <td> <p>A character vector of one or more paths. For <code>link_create()</code>, this is the target.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Additional arguments passed to <code><a href="path.html">path()</a></code></p> </td></tr> <tr valign="top"><td><code>mode</code></td> <td> <p>If file/directory is created, what mode should it have? </p> <p>Links do not have mode; they inherit the mode of the file they link to.</p> </td></tr> <tr valign="top"><td><code>recurse</code></td> <td> <p>should intermediate directories be created if they do not exist?</p> </td></tr> <tr valign="top"><td><code>recursive</code></td> <td> <p>(Deprecated) If <code>TRUE</code> recurse fully.</p> </td></tr> <tr valign="top"><td><code>new_path</code></td> <td> <p>The path where the link should be created.</p> </td></tr> <tr valign="top"><td><code>symbolic</code></td> <td> <p>Boolean value determining if the link should be a symbolic (the default) or hard link.</p> </td></tr> </table> <h3>Value</h3> <p>The path to the created object (invisibly). </p> <h3>Examples</h3> <pre> file_create("foo") is_file("foo") # dir_create applied to the same path will fail try(dir_create("foo")) dir_create("bar") is_dir("bar") # file_create applied to the same path will fail try(file_create("bar")) # Cleanup file_delete("foo") dir_delete("bar") </pre> <hr /><div style="text-align: center;">[Package <em>fs</em> version 1.5.2 <a href="00Index.html">Index</a>]</div> </body></html>