mirror of https://github.com/flaggo/pydu.git
update description about path.is_super_path
This commit is contained in:
parent
4f534879b2
commit
d79251168d
|
@ -16,8 +16,8 @@ Path
|
|||
Note that if ``path1`` is same as ``path2``, it's also regarded as
|
||||
the super path os ``path2``.
|
||||
|
||||
For instance "/opt" is the super path of "/opt/test",
|
||||
While "/opt/t" is the super path of "/opt/test"
|
||||
For instance "/", "/opt" and "/opt/test" are all the super paths of "/opt/test",
|
||||
while "/opt/t" is the super path of "/opt/test".
|
||||
|
||||
>>> from pydu.path import is_super_path
|
||||
>>> is_super_path('/aa/bb/cc', '/aa/bb/cc')
|
||||
|
|
|
@ -18,8 +18,8 @@ def is_super_path(path1, path2):
|
|||
Whether `path1` is the super path of `path2`.
|
||||
Note that if `path1` is same as `path2`, it's also regarded as
|
||||
the super path os `path2`.
|
||||
For instance "/opt" is the super path of "/opt/test",
|
||||
While "/opt/t" is the super path of "/opt/test"
|
||||
For instance "/", "/opt" and "/opt/test" are all the super paths of "/opt/test",
|
||||
while "/opt/t" is the super path of "/opt/test".
|
||||
"""
|
||||
path1 = os.path.normpath(path1)
|
||||
current_path2 = os.path.normpath(path2)
|
||||
|
|
Loading…
Reference in New Issue