file_path_sans_ext
Get the path of a file without the extension
Parameters
| path |
Union[str, List[str]] |
Path to the file or a list of paths to files |
required |
Returns
|
Union[str, List[str]] |
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']