ensureFolderDoesNotEndInSep: Checks that the last character of the folder is the separator

View source: R/utils.R

ensureFolderDoesNotEndInSepR Documentation

Checks that the last character of the folder is the separator

Description

If the last character in a folder's name is the file separator, remove it.

Usage

ensureFolderDoesNotEndInSep(folder)

Arguments

folder

A string, the folder name

Details

The reason this is included is because the R function file.path will not realise the last element is the platform's file separator, so concatenating could result in a double slash.

The reason this is included is because the R function file.path will not realise the last element is the platform's file separator, so concatenating could result in a double slash.

Value

The folder name, WITHOUT the separator, if it is present.


ffstream documentation built on May 31, 2023, 7:53 p.m.