Title: | Open System Files, 'URLs', Anything |
Version: | 1.0.1 |
Description: | Cross platform solution to open files, directories or 'URLs' with their associated programs. |
License: | MIT + file LICENSE |
URL: | https://github.com/r-lib/xopen#readme, https://r-lib.github.io/xopen/ |
BugReports: | https://github.com/r-lib/xopen/issues |
Depends: | R (≥ 3.1) |
Imports: | processx |
Suggests: | ps, testthat (≥ 3.0.0) |
Config/Needs/website: | tidyverse/tidytemplate |
Config/testthat/edition: | 3 |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | no |
Packaged: | 2024-04-25 08:49:03 UTC; gaborcsardi |
Author: | Gábor Csárdi [aut, cre], Fathi Boudra [aut], Rex Dieter [aut], Kevin Krammer [aut], Jeremy White [aut], Posit Software, PBC [cph, fnd] |
Maintainer: | Gábor Csárdi <csardi.gabor@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2024-04-25 09:10:02 UTC |
xopen: Open System Files, 'URLs', Anything
Description
Cross platform solution to open files, directories or 'URLs' with their associated programs.
Author(s)
Maintainer: Gábor Csárdi csardi.gabor@gmail.com
Authors:
Fathi Boudra
Rex Dieter
Kevin Krammer
Jeremy White
Other contributors:
Posit Software, PBC [copyright holder, funder]
See Also
Useful links:
Report bugs at https://github.com/r-lib/xopen/issues
Wait for a process to finish
Description
With timeout(s), and interaction, if the session is interactive.
Usage
wait_for_finish(process, target, timeout1 = 2000, timeout2 = 5000)
Arguments
process |
The process. It should not have |
timeout1 |
Timeout before message. |
timeout2 |
Timeout after message. |
Details
First we wait for 2s. If the process is still alive, then we give it another 5s, but first let the user know that they can interrupt the process.
Open a file, directory or URL
Description
Open a file, directory or URL, using the local platforms conventions, i.e. associated applications, default programs, etc. This is usually equivalent to double-clicking on the file in the GUI.
Usage
xopen(target = NULL, app = NULL, quiet = FALSE, ...)
Arguments
target |
String, the path or URL to open. |
app |
Specify the app to open |
quiet |
Whether to echo the command to the screen, before running it. |
... |
Additional arguments, not used currently. |
Examples
xopen("test.R") xopen("https://ps.r-lib.org") xopen(tempdir())