Merge "Add implementation of dir function" am: fa92dd5f32

Original change: https://android-review.googlesource.com/c/platform/build/+/2045947

Change-Id: I5d7553c25c154d537e48eeb9e371c79785557c09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-03-29 21:32:55 +00:00 committed by Automerger Merge Worker
commit 25ab8f0b90

View file

@ -439,6 +439,10 @@ def __base(path):
"""Returns basename.""" """Returns basename."""
return path.rsplit("/",1)[-1] return path.rsplit("/",1)[-1]
def __dir(path):
"""Returns dirname."""
return path.rsplit("/",1)[0]
def _board_platform_in(g, string_or_list): def _board_platform_in(g, string_or_list):
"""Returns true if board is in the list.""" """Returns true if board is in the list."""
board = g.get("TARGET_BOARD_PLATFORM","") board = g.get("TARGET_BOARD_PLATFORM","")
@ -736,6 +740,7 @@ rblf = struct(
copy_files = _copy_files, copy_files = _copy_files,
copy_if_exists = _copy_if_exists, copy_if_exists = _copy_if_exists,
cfg = __h_cfg, cfg = __h_cfg,
dir = __dir,
enforce_product_packages_exist = _enforce_product_packages_exist, enforce_product_packages_exist = _enforce_product_packages_exist,
expand_wildcard = _expand_wildcard, expand_wildcard = _expand_wildcard,
file_exists = rblf_file_exists, file_exists = rblf_file_exists,