setPBSext {PBSmodelling}R Documentation

Set Command to Associate with File Name Extension

Description

Set a command with an associated extension, for use in openFile. The command must specify where the target file name is inserted by indicating a '%f'.

Usage

setPBSext(ext, cmd)

Arguments

ext

character – string specifying the extension suffix.

cmd

character – command string to associate with the extension.

Note

These values are not saved from one PBS Modelling session to the next.

Author(s)

Alex Couture-Beil, Software Engineer
Earthly Technologies, Victoria BC

Maintainer: Rowan Haigh, Program Head – Offshore Rockfish
Pacific Biological Station (PBS), Fisheries & Oceans Canada (DFO), Nanaimo BC
locus opus: Regional Headquarters (RHQ), Vancouver BC
Last modified Rd: 2023-01-05

See Also

In package PBSmodelling:
getPBSext, openFile, clearPBSext

Examples

## Not run: 
local(envir=.PBSmodEnv,expr={
  ## Set 'Firefox' to open '.html' files (only applicable if Firefox is NOT default web browser)
  setPBSext("html", '"c:/Program Files/Mozilla Firefox/firefox.exe" file://%f')
  openFile("foo.html")

  ## Set 'notepad' to open '.txt' files (only applicable if notepad is NOT default editor)
  ## Note that commands to editors (at least in Windows) do not use 'file://'.
  setPBSext('txt', '"C:/Windows/notepad.exe" %f')
  openFile("foo.txt")
})

## End(Not run)

[Package PBSmodelling version 2.69.3 Index]