file_path_sans_ext

file_path_sans_ext(path)

Get the path of a file without the extension

Args: path (str | List[str]): Path to the file or a list of paths to files

Returns: the path to the file without the extension or a list of paths of the files without the extension in case path is a list

Examples: >>> from rlike import * >>> x = file_path_sans_ext(‘mydata.pickle’) >>> x ‘mydata’ >>> x = file_path_sans_ext([‘/home/xyz/mydata.pickle’, ‘/home/xyz/mydata.txt’]) >>> x [‘/home/xyz/mydata’, ‘/home/xyz/mydata’]