From bc6e79e7cfbd83f81c262961a6e93c89fa555edb Mon Sep 17 00:00:00 2001 From: Prodesire Date: Sun, 15 Apr 2018 21:15:58 +0800 Subject: [PATCH] add doc for path.fileext --- docs/path.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/path.rst b/docs/path.rst index 4e97985..77b4e43 100644 --- a/docs/path.rst +++ b/docs/path.rst @@ -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'