The os.Path class / os.Path methods |
Returns the file path without the file extension of the last element of the file path.
This method removes the file extension from the path provided as parameter.
For example, if you pass "/root/dir1/file.ext" as the parameter it will return "/root/dir1/file".
See Example 1: Extracting the parts of a file name for more examples.