MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / path_split

Function path_split

keepercommander/subfolder.py:183–190  ·  view source on GitHub ↗

Split a path into directories with two replaces and a split.

(params, folder, path_string)

Source from the content-addressed store, hash-verified

181
182
183def path_split(params, folder, path_string):
184 """Split a path into directories with two replaces and a split."""
185 if is_abs_path(path_string):
186 folder = params.root_folder
187 path_string = path_string[1:]
188
189 components = [s.replace('\0', '/') for s in path_string.replace('//', '\0').split('/')]
190 return folder, components
191
192
193def try_resolve_path(params, path, find_all_matches=False,

Callers 2

try_resolve_pathFunction · 0.85

Calls 1

is_abs_pathFunction · 0.85

Tested by

no test coverage detected