hasTrailingSlash: Utility functions for handling path and file names

Description Usage Arguments Value

Description

hasTrailingSlash checks for a trailing slash '/' in a path string, addTrailingSlash adds a slash if it isn't already present, and stripFileExtension strips the final file extension (.txt, etc.) from a given file name

Usage

1

Arguments

dirpath

a string containing a path to a directory

filepath

a string containing a path to a file

Value

hasTrailiingSlash returns a boolean flag. addTrailingSlash returns the directory path, and stripFileExtension returns the file with the extension removed.


elsander/PredictImportance documentation built on May 5, 2019, 3:49 a.m.