add doc for path.fileext

This commit is contained in:
Prodesire 2018-04-15 21:15:58 +08:00
parent dc60710d95
commit bc6e79e7cf
1 changed files with 10 additions and 0 deletions

View File

@ -46,3 +46,13 @@ Utils for handling path.
>>> from pydu.path import filename
>>> filename('/foo/bar.ext')
'bar'
.. py:function:: pydu.path.fileext(path)
Return the file extension.
If file has not extension, return empty string.
>>> from pydu.path import fileext
>>> filename('/foo/bar.ext')
'.ext'