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

Function path_split

keepercommander/subfolder.py:136–143  ·  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

134
135
136def path_split(params, folder, path_string):
137 """Split a path into directories with two replaces and a split."""
138 if is_abs_path(path_string):
139 folder = params.root_folder
140 path_string = path_string[1:]
141
142 components = [s.replace('\0', '/') for s in path_string.replace('//', '\0').split('/')]
143 return folder, components
144
145
146def try_resolve_path(params, path, find_all_matches=False):

Callers 1

try_resolve_pathFunction · 0.85

Calls 1

is_abs_pathFunction · 0.85

Tested by

no test coverage detected