basename

basename(path)

Get the basename of a file

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

Returns: the basename of the file or a list of basename of the files in case path is a list

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