fs.basename

fs.basename

fs.basename

Function

Returns the last level name of the path.

Syntax

Parameters

No parameters.

Return value

TypeDescription
StringReturns the file name or directory name.

Example

Notes

  • Returns an empty string if the path has no filename part.