summaryrefslogtreecommitdiff
path: root/fs/path.py
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2011-03-24 16:36:44 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2011-03-24 16:36:44 +0000
commitf016526c75302219b9f35bc1dd443768e25efc61 (patch)
tree74a1128b630f8a48cc78fb72df09438350866352 /fs/path.py
parent0266476903fde8cfbfad41fad1a8832357ecb0f3 (diff)
downloadpyfilesystem-f016526c75302219b9f35bc1dd443768e25efc61.tar.gz
docstring tweak for basename
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@676 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/path.py')
-rw-r--r--fs/path.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/path.py b/fs/path.py
index 7b39988..4b69198 100644
--- a/fs/path.py
+++ b/fs/path.py
@@ -211,7 +211,7 @@ def split(path):
def splitext(path):
"""Splits the extension from the path, and returns the path (up to the last
- '.' and the extension
+ '.' and the extension).
:param path: A path to split
@@ -268,13 +268,19 @@ def dirname(path):
def basename(path):
"""Returns the basename of the resource referenced by a path.
- This is always equivalent to the 'head' component of the value returned
+ This is always equivalent to the 'tail' component of the value returned
by pathsplit(path).
:param path: A FS path
>>> basename('foo/bar/baz')
'baz'
+
+ >>> basename('foo/bar')
+ 'bar'
+
+ >>> basename('foo/bar/')
+ ''
"""
if '/' not in path: