openFile {PBSmodelling} | R Documentation |
Open a file using the program associated with its extension
defined by the Windows shell. Non-windows users, or users
wishing to overide the default application, can specify a
program association using setPBSext
.
openFile(fname, package=NULL)
fname |
name(s) of file(s) to open. |
package |
(optional) open files relative to this package |
An invisible string vector of the file names and/or commands + file names.
Windows only: openFile( ".." )
does not work as expected, but openFile( "../.." ) only opens the first parent directory.
If a command is registered with setPBSext
, then
openFile
will replace all occurrences of "%f"
with the absolute path of the filename, before executing the command.
Alex Couture-Beil, Malaspina University-College, Nanaimo BC
getPBSext
, setPBSext
, clearPBSext
,
writePBSoptions
## Not run: #use openFile directly: openFile( "doc/PBSmodelling-UG.pdf", package="PBSmodelling" ) #via doAction in a window description file: createWin( "button text=help func=doAction action=\"openFile( `doc/PBSmodelling-UG.pdf`, package=`PBSmodelling` )\"", astext=TRUE ) ############################# # Set up firefox to open .html files (only applicable if firefox is NOT the default web browser setPBSext("html", '"c:/Program Files/Mozilla Firefox/firefox.exe" file://%f') openFile("foo.html") ## End(Not run)