The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

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:

Other contributors:

See Also

Useful links:


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 stdout or stderr pipes, because that can make it freeze.

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 target with, and its arguments, in a character vector. Note that app names are platform dependent.

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())

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.