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.
197
197
Given a full path name, remove all but the final part (the file name).
198
198
Also remove the suffix, if it is passed.
199
199
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
+
200
204
:param string path-name: path name
201
205
:param string suffix: suffix
202
206
@@ -212,6 +216,15 @@ Below is a list of all ``fio`` functions and members.
212
216
- my
213
217
...
214
218
219
+ **Example with a trailing slash: **
220
+
221
+ .. code-block :: tarantoolsession
222
+
223
+ tarantool> fio.basename('/path/to/')
224
+ ---
225
+ -
226
+ ...
227
+
215
228
.. _fio-dirname :
216
229
217
230
.. function :: dirname(path-name)
You can’t perform that action at this time.
0 commit comments