Skip to content

file.name

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Get the filename (last path component) of a path string

Parameters

Parameter Default Value Note
path

Return value

Condition Return Value
(always) string

Notes

Example

import "file"
print file.name("/home/user/docs/report.txt")   // "report.txt"

Clone this wiki locally