# path.basename ## Function Returns the file name in the path. ## Syntax ```bt path(text).basename() ``` ## Parameters None. ## Return value | Type | Description | | ------ | ------ | | String | File name. | ## Code Example ```bt result = path('root/docs/index.md').basename() // Output: index.md print result ``` ## Notes - Does not determine whether the target actually exists.