Learn R Programming

ffstream (version 0.1.7.2)

ensureFolderDoesNotEndInSep: 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)

Value

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

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.