Skip to content

Commit

Permalink
Updates per PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
Javagedes committed Aug 4, 2023
1 parent 1a12705 commit a2b4bf2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion edk2toollib/uefi/edk2/path_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def PackagePathList(self):
return [str(p) for p in self._package_path_list]

def GetEdk2RelativePathFromAbsolutePath(self, *abspath: str) -> str:
"""Transforms an abolute path to an edk2 path relative to the workspace or a packages path.
"""Transforms an absolute path to an edk2 path relative to the workspace or a packages path.
Args:
*abspath: absolute path to a file or directory. Can be the entire path or parts of the path provided
Expand All @@ -196,6 +196,12 @@ def GetEdk2RelativePathFromAbsolutePath(self, *abspath: str) -> str:
(str): POSIX-like path relative to the workspace or packages path
(None): abspath is None
(None): path is not valid
Example:
```python
rel_path = edk2path.GetEdk2RelativePathFromAbsolutePath("C:/Workspace/edk2/MdePkg/Include")
rel_path = edk2path.GetEdk2RelativePathFromAbsolutePath("C:/Workspace", "edk2", "MdePkg", "Include")
```
"""
if abspath == (None,):
return None
Expand Down Expand Up @@ -247,6 +253,12 @@ def GetAbsolutePathOnThisSystemFromEdk2RelativePath(self, *relpath: str, log_err
(str): absolute path in the OS specific form
(None): invalid relpath
(None): Unable to get the absolute path
Example:
```python
abs_path = edk2path.GetAbsolutePathOnThisSystemFromEdk2RelativePath("MdePkg/Include")
abs_path = edk2path.GetAbsolutePathOnThisSystemFromEdk2RelativePath("MdePkg", "Include")
```
"""
if relpath == (None,):
return None
Expand Down

0 comments on commit a2b4bf2

Please sign in to comment.