Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions doc/reference/reference_lua/fio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ Below is a list of all ``fio`` functions and members.
Given a full path name, remove all but the final part (the file name).
Also remove the suffix, if it is passed.

Note that the basename of a path with a trailing slash is an empty string.
It is different from how the Unix ``basename`` program interprets such a
path.

:param string path-name: path name
:param string suffix: suffix

Expand All @@ -212,6 +216,15 @@ Below is a list of all ``fio`` functions and members.
- my
...

**Example with a trailing slash:**

.. code-block:: tarantoolsession

tarantool> fio.basename('/path/to/')
---
-
...

.. _fio-dirname:

.. function:: dirname(path-name)
Expand Down