path.name()
Extracts the final normalized component.
Signature
path.name(value[, style])
Parameters
Text path plus optional style.
Returns
String, empty for a root alone.
Behavior
Pure lexical operation.
Errors
Bad path or style.
Example
use path
assert(path.name('/tmp/data.txt', 'unix') == 'data.txt')