path.functions: Constructs Path Functions Similar to 'this.path()'

path.functionsR Documentation

Constructs Path Functions Similar to 'this.path()'

Description

path.functions() accepts a pathname and constructs a set of path-related functions, similar to this.path() and associated.

Usage

path.functions(file, local = FALSE, n = 0,
               envir = parent.frame(n + 1),
               matchThisEnv = getOption("topLevelEnvironment"),
               srcfile = if (n) sys.parent(n) else 0)

Arguments

file

a character string giving the pathname of the file or URL.

local, n, envir, matchThisEnv, srcfile

See ?this.path().

Value

An environment with at least the following bindings:

this.path

Function with formals (original = FALSE, contents = FALSE) which returns the \codelink2base:normalizePathnormalized file path, the original file path, or the contents of the file.

this.dir

Function with no formals which returns the directory of the \codelink2base:normalizePathnormalized file path.

here

Function with formals (..., .. = 0) which constructs file paths, starting with the file's directory.

this.proj

Function with formals (..., .. = 0) which constructs file paths, starting with the project root.

rel2here, rel2proj

Functions with formals (path) which turn absolute paths into relative paths, against the file's directory / / project root.

LINENO

Function with no formals which returns the line number of the executing expression in file.


ArcadeAntics/this.path documentation built on July 31, 2024, 12:25 p.m.