File.prototype.name()

Returns a file’s name.

Syntax

file.name() string

Description

Returns a file’s name, which is the last segment of its path.

Examples

Name of a non-root file.

Name of the root file equals its domain.