fileName method

String fileName()

Returns the final component of the Path, if there is one.

Implementation

String fileName() => isWindows ? WindowsPath(_string).fileName() : UnixPath(_string).fileName();