UseCases.FileSysObjects.branches.normalizeSearchPathLists package¶
Submodules¶
UseCases.FileSysObjects.branches.normalizeSearchPathLists.CallCase module¶
Find a matching relative filepathname in upper directory tree.
Calling elementary functions.
Data:
see 'testdata.examples'
Call:
import testdata import filesysobjects.FileSysObjects s = os.sep any_sub_path = os.path.normpath('a/b0/c/d/D.txt') spath = testdata.mypath spath += any_sub_path _plist = [] setUpperTreeSearchPath(spath,os.path.normpath('b/B.txt'), _plist) rp = findRelPathInSearchPath(spath,_plist)
Result:
expected = os.path.normpath(testdata.mypath +s+ 'a/b/B.txt')