fluentfs.paths.paths.base_name

fluentfs.paths.paths.base_name(path: str) str

Get the base name of a file-like object (i.e. a file or directory).

Examples: * base_name(“/home/username/somedir/a.txt”) returns “a.txt” * base_name(“/home/username/somedir/subdir”) returns “subdir”

Parameters:

path – The path of the file-like object.

Returns:

The base name of the file-like object.