file-name ( path -- string )
Factor handbook > Input and output > Pathnames

Prev:parent-directory ( path -- parent )
Next:file-stem ( path -- stem )


Vocabulary
io.pathnames

Inputs and outputs
patha pathname string
stringa string


Word description
Outputs the last component of a pathname string.

Examples
USING: io.pathnames prettyprint ; "/usr/bin/gcc" file-name .
"gcc"

USING: io.pathnames prettyprint ; "/usr/libexec/awk/" file-name .
"awk"


See also
file-stem, file-extension

Definition