本文整理匯總了Python中scripts.core.base.Paths.match方法的典型用法代碼示例。如果您正苦於以下問題:Python Paths.match方法的具體用法?Python Paths.match怎麽用?Python Paths.match使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類scripts.core.base.Paths
的用法示例。
在下文中一共展示了Paths.match方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _get_ref_output_files
# 需要導入模塊: from scripts.core.base import Paths [as 別名]
# 或者: from scripts.core.base.Paths import match [as 別名]
def _get_ref_output_files(self, comp_data):
"""
:type comp_data: dict
"""
# parse filters
filters = [PathFilters.filter_wildcards(x) for x in comp_data.get('files', [])]
# browse files and make them relative to ref output so filters works properly
files = Paths.walk(self.case.fs.ref_output, [PathFilters.filter_type_is_file()])
files = [Paths.relpath(f, self.case.fs.ref_output) for f in files]
# filter files and make them absolute again
files = Paths.match(files, filters)
files = [Paths.join(self.case.fs.ref_output, f) for f in files]
return zip(files, self._get_mirror_files(files))