| 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 bcecfa5204cf08001834d8d31071986609f29cb2..167e844f2a076562a158fdcc6629ffde37d61ce7 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
|
|
|