edit_file {usethis}R Documentation

Open file for editing

Description

Opens a file for editing in RStudio, if that is the active environment, or via utils::file.edit() otherwise. If the file does not exist, it is created. If the parent directory does not exist, it is also created.

Usage

edit_file(path, open = rlang::is_interactive())

Arguments

path

Path to target file.

open

Whether to open the file for interactive editing.

Value

Target path, invisibly.

Examples

## Not run: 
edit_file("DESCRIPTION")
edit_file("~/.gitconfig")

## End(Not run)

[Package usethis version 1.6.3 Index]