Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
5b81bb65
Commit
5b81bb65
authored
Mar 24, 2011
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docstring tweak for basename
parent
90608df9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
fs/path.py
+8
-2
No files found.
fs/path.py
View file @
5b81bb65
...
@@ -211,7 +211,7 @@ def split(path):
...
@@ -211,7 +211,7 @@ def split(path):
def
splitext
(
path
):
def
splitext
(
path
):
"""Splits the extension from the path, and returns the path (up to the last
"""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
:param path: A path to split
...
@@ -268,13 +268,19 @@ def dirname(path):
...
@@ -268,13 +268,19 @@ def dirname(path):
def
basename
(
path
):
def
basename
(
path
):
"""Returns the basename of the resource referenced by a 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).
by pathsplit(path).
:param path: A FS path
:param path: A FS path
>>> basename('foo/bar/baz')
>>> basename('foo/bar/baz')
'baz'
'baz'
>>> basename('foo/bar')
'bar'
>>> basename('foo/bar/')
''
"""
"""
if
'/'
not
in
path
:
if
'/'
not
in
path
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment