Capy-Bearer Documentation

basename

host call

Capy

function basename(path : string) string

Description

basename returns the final component of a path.

It does not access the file system.

Parameters

path : a path string

Return Values

the final path component

Example

Capy

print(basename("/var/www/site/index.capy"), "\n")