mirror of https://github.com/flaggo/pydu.git
add doc for path.fileext
This commit is contained in:
parent
dc60710d95
commit
bc6e79e7cf
|
@ -46,3 +46,13 @@ Utils for handling path.
|
||||||
>>> from pydu.path import filename
|
>>> from pydu.path import filename
|
||||||
>>> filename('/foo/bar.ext')
|
>>> filename('/foo/bar.ext')
|
||||||
'bar'
|
'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'
|
||||||
|
|
Loading…
Reference in New Issue