mount: Detect whether the script is run locally or on server

View source: R/server.R

mountR Documentation

Detect whether the script is run locally or on server

Description

This function detects via nodename whether the script is run from a server or locally with the server system mounted. This function basically returns the mountpoint string if the user (as detected by Sys.info) is not a server. This is useful when constructing file paths, since the same code will still get correct files if mounted via sshfs.

Usage

mount(
  server = c("esrumweb01fl.unicph.domain", "esrumhead01fl.unicph.domain"),
  mountpoint = "~/esrum"
)

Arguments

server

server nodename

mountpoint

Path to sshfs mountpoint.

Value

Appropriate prefix for file locations on server.


MalteThodberg/ThodbergMisc documentation built on April 23, 2024, 12:34 a.m.