MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / GetFullPathDist

Function GetFullPathDist

BaseTools/Source/Python/UPT/UPT.py:325–338  ·  view source on GitHub ↗
(DistFile, WorkspaceDir)

Source from the content-addressed store, hash-verified

323# @return AbsPath: The Absolute path of the distribution file if existed, None else
324#
325def GetFullPathDist(DistFile, WorkspaceDir):
326 if os.path.isabs(DistFile):
327 if not (os.path.exists(DistFile) and os.path.isfile(DistFile)):
328 return None
329 else:
330 return DistFile
331 else:
332 AbsPath = os.path.normpath(os.path.join(os.getcwd(), DistFile))
333 if not (os.path.exists(AbsPath) and os.path.isfile(AbsPath)):
334 AbsPath = os.path.normpath(os.path.join(WorkspaceDir, DistFile))
335 if not (os.path.exists(AbsPath) and os.path.isfile(AbsPath)):
336 return None
337
338 return AbsPath
339
340if __name__ == '__main__':
341 RETVAL = Main()

Callers 1

MainFunction · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected