fileName method

String fileName()

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

Implementation

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