this.path News

CHANGES IN this.path 1.1.0:

  NEW FEATURES

    * this.path() now works inside knitr::knit(), fixing issue #4 at
      BugReports URL. By extension, withArgs(knitr::knit()) now also
      works.

    * this.path() now accepts arguments original and for.msg that return the
      original argument from source / / knit / / Rscript or return a character
      string that can be used in diagnostic messages / / warnings / / errors.
      It should be noted that this.path(for.msg = TRUE) should not be used for
      constructing file paths.

    * shFILE() also accepts argument original that returns the original FILE
      argument from Rscript.

    * Added splitext(), removeext(), ext(), and ext<-() for
      manipulating paths with extensions.

    * Added progArgs(), similar to fileArgs() but better, might remove
      fileArgs() later.

    * Added is.main() for determining if an expression is run in a
      top-level code environment.

    * Added wrap.source() and inside.source() for implementing this.path()
      with any source-like function.

    * Added LINENO() for determining the line number of the executing
      expression in the executing script.

    * Added relpath(), a version of as.rel.path() with different default
      argument values.

    * Added OS.type, a list of TRUE/FALSE values giving more details about
      the operating system.

  DEPRECATED AND DEFUNCT:

    * normalized.shFILE(), this.path2(), this.dir2(), and this.dir3() are
      defunct and should be replaced with shFILE(), this.path(default = NULL),
      this.dir(default = NULL), and this.dir(default = getwd()),
      respectively.

  BUG FIXES

    * check.path() and check.dir() now use path.join() instead of
      file.path().

    * fileArgs(), progArgs(), from.shell(), and is.main() no longer force the
      normalization of the source / / knit / / Rscript path, but instead save
      it as a promise to be evaluated later if / / when desired.

CHANGES IN this.path 1.0.2:

  BUG FIXES

    * See issue #3 at BugReports URL. Fixed this.path() when called
      in a script run from a shell on ubuntu installed on an android
      (where .Platform$GUI == "unknown", normally "unix").

CHANGES IN this.path 1.0.1:

  BUG FIXES

    * Fixed path.join(), basename2(), and dirname2() not having a
      trailing nul-character.

CHANGES IN this.path 1.0.0:

  NEW FEATURES

    * Added path.join(), basename2(), and dirname2() for constructing
      and manipulating paths to files. These are based on file.path(),
      basename(), and dirname(), but behave differently with network
      shares and a few important edge cases.

  SIGNIFICANT USER-VISIBLE CHANGES

    * this.dir(), here(), and this.proj() all use path.join() and
      dirname2() instead of file.path() and dirname(), this may change
      behaviour for some users and cases, but should be an
      improvement overall.

CHANGES IN this.path 0.11.0:

  NEW FEATURES

    * Added tryCatch2(), introducing argument 'else.' similar to
      'try except' in 'Python'.

    * Added 'else.' argument to this.path(), this.dir(), shFILE(), and
      normalized.shFILE(), a function to act on the return value.

CHANGES IN this.path 0.10.0:

  NEW FEATURES

    * Added asArgs(), fileArgs(), and withArgs() to more easily provide
      arguments to a script.

    * Added from.shell() to determine if a script was run from a shell.

    * Added this.proj(...), similar to here::here(...), except that
      this.proj() supports multiple projects in one R session.

  BUG FIXES

    * this.path::here() no longer uses dirname() on a UNC path.

CHANGES IN this.path 0.9.0:

  NEW FEATURES:

    * this.path() and all its associated functions now work in VSCode.

  BUG FIXES:

    * when source-ing a file URL, source("file:///path/to/file"),
      this.path() no longer attempts to re-open a connection.

CHANGES IN this.path 0.8.0:

  SIGNIFICANT USER-VISIBLE CHANGES:

    * All previously defunct functions were removed entirely.

  NEW FEATURES:

    * this.path(), this.dir(), shFILE(), and normalized.shFILE() were
      given a new argument default that will be evaluated and returned
      if there is no executing script or command line argument FILE was
      not found.

  DEPRECATED AND DEFUNCT:

    * this.path2(), this.dir2(), and this.dir3() are deprecated and
      should be replaced with this.path(default = NULL),
      this.dir(default = NULL), and this.dir(default = getwd()),
      respectively.

  BUG FIXES:

    * normalized.shFILE() no longer sets attribute
      "this.path.from.shell", that is now handled by this.path().
