動態遠程文件解析器
public class DynamicRemoteFileResolver
extends Object
java.lang.Object | |
↳ | com.android.tradefed.config.DynamicRemoteFileResolver |
幫助解析遠程文件路徑的類。
例如:gs://bucket/path/file.txt 會通過從GCS bucket下載文件來解析。
應將新協議添加到 META_INF/services。
概括
嵌套類 | |
---|---|
interface | DynamicRemoteFileResolver.FileResolverLoader 加載 |
領域 | |
---|---|
public static final String | OPTIONAL_KEY |
public static final String | UNZIP_KEY
|
公共構造函數 | |
---|---|
DynamicRemoteFileResolver () | |
DynamicRemoteFileResolver ( DynamicRemoteFileResolver.FileResolverLoader loader) |
公共方法 | |
---|---|
void | addExtraArgs ( extraArgs) addExtraArgs ( extraArgs) 為查詢添加額外的參數。 |
void | resolvePartialDownloadZip (File destDir, String remoteZipFilePath, includeFilters, excludeFilters) resolvePartialDownloadZip (File destDir, String remoteZipFilePath, includeFilters, excludeFilters) resolvePartialDownloadZip (File destDir, String remoteZipFilePath, includeFilters, excludeFilters) 在遠程 zip 文件中下載與給定過濾器匹配的文件。 |
void | setDevice ( ITestDevice device) 設置被測設備 |
void | setOptionMap ( optionMap) setOptionMap ( optionMap) 設置來自 |
static final File | unzipIfRequired (File downloadedFile, query) unzipIfRequired (File downloadedFile, query) 允許檢查文件是否應解壓縮並在需要時解壓縮的實用程序。 |
final | validateRemoteFilePath () 遍歷所有 |
領域
OPTIONAL_KEY
public static final String OPTIONAL_KEY
UNZIP_KEY
public static final String UNZIP_KEY
公共構造函數
動態遠程文件解析器
public DynamicRemoteFileResolver ()
動態遠程文件解析器
public DynamicRemoteFileResolver (DynamicRemoteFileResolver.FileResolverLoader loader)
參數 | |
---|---|
loader | DynamicRemoteFileResolver.FileResolverLoader |
公共方法
添加額外參數
public void addExtraArgs (extraArgs)
為查詢添加額外的參數。
參數 | |
---|---|
extraArgs |
resolvePartialDownloadZip
public void resolvePartialDownloadZip (File destDir, String remoteZipFilePath,includeFilters, excludeFilters)
在遠程 zip 文件中下載與給定過濾器匹配的文件。
遠程 zip 文件中的文件只有在其路徑匹配任何包含過濾器但不匹配排除過濾器時才會被下載。
參數 | |
---|---|
destDir | File : 將下載內容放入的文件。 |
remoteZipFilePath | String :要下載的 zip 文件的遠程路徑,相對於特定於實現的根目錄。 |
includeFilters | |
excludeFilters |
投擲 | |
---|---|
BuildRetrievalError | 如果無法下載文件。 |
unzipIfRequired
public static final File unzipIfRequired (File downloadedFile,query)
允許檢查文件是否應解壓縮並在需要時解壓縮的實用程序。
參數 | |
---|---|
downloadedFile | File |
query |
退貨 | |
---|---|
File |
驗證遠程文件路徑
public finalvalidateRemoteFilePath ()
遍歷所有ERROR(/File)
選項類型並檢查是否應解析它們的路徑。
退貨 | |
---|---|
以這種方式解決的ERROR(/File) 列表。 |
投擲 | |
---|---|
| com.android.tradefed.build.BuildRetrievalError |
BuildRetrievalError |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-03-30 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]