![]() | the sleepy snakeindex :: path :: get_ext | |||||||||
get_ext(path, components=1)Returns the file extension part of a path or empty string The components keyword can be used to handle filenames containing multiple extensions. See the table below:
fpath = "myfile.txt.zip" get_ext(fpath) >> ".zip" get_ext(fpath, -1) >> ".txt.zip" | ||||||||||