| Index: chrome/common/extensions/docs/server2/path_util.py
|
| diff --git a/chrome/common/extensions/docs/server2/path_util.py b/chrome/common/extensions/docs/server2/path_util.py
|
| index fa9db48553dc82f86a333aa9171b48fb88dd8d66..aa644672b5ac36aab8e6288910c7ae7f7c0608f2 100644
|
| --- a/chrome/common/extensions/docs/server2/path_util.py
|
| +++ b/chrome/common/extensions/docs/server2/path_util.py
|
| @@ -45,6 +45,17 @@ def SplitParent(path):
|
| return parent, base
|
|
|
|
|
| +def Split(path):
|
| + '''Returns a list of the directories and filename in a path. 'p1/p2/p3'
|
| + will return ['p1/', 'p2/', 'p3'].
|
| + '''
|
| + AssertIsValid(path)
|
| + names = [name + '/' for name in path.rstrip('/').split('/')]
|
| + if names and not path.endswith('/'):
|
| + names[-1] = names[-1][:-1]
|
| + return names
|
| +
|
| +
|
| def ToDirectory(path):
|
| '''Returns a string representing |path| as a directory, that is,
|
| IsDirectory(result) is True (and does not fail assertions). If |path| is
|
|
|