File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
doc/reference/reference_lua Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,10 @@ Below is a list of all ``fio`` functions and members.
197197 Given a full path name, remove all but the final part (the file name).
198198 Also remove the suffix, if it is passed.
199199
200+ Note that the basename of a path with a trailing slash is an empty string.
201+ It is different from how the Unix ``basename `` program interprets such a
202+ path.
203+
200204 :param string path-name: path name
201205 :param string suffix: suffix
202206
@@ -212,6 +216,15 @@ Below is a list of all ``fio`` functions and members.
212216 - my
213217 ...
214218
219+ **Example with a trailing slash: **
220+
221+ .. code-block :: tarantoolsession
222+
223+ tarantool> fio.basename('/path/to/')
224+ ---
225+ -
226+ ...
227+
215228 .. _fio-dirname :
216229
217230.. function :: dirname(path-name)
You can’t perform that action at this time.
0 commit comments