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