edit_file: Open file for editing

Description Usage Arguments Value Examples

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

1
edit_file(path)

Arguments

path

Path to target file.

Value

Target path, invisibly.

Examples

1
2
3
4
5
## Not run: 
edit_file("DESCRIPTION")
edit_file("~/.gitconfig")

## End(Not run)

usethis documentation built on July 4, 2019, 5:05 p.m.