動態遠端文件解析器
public class DynamicRemoteFileResolver
extends Object
java.lang.Object | |
↳ | com.android.tradefed.config.DynamicRemoteFileResolver |
幫助解析遠端檔案路徑的類別。
例如:gs://bucket/path/file.txt 將透過從GCS儲存桶下載檔案來解析。
新協定應新增至 META_INF/services 中。
概括
嵌套類 | |
---|---|
interface | DynamicRemoteFileResolver.FileResolverLoader 載入 |
領域 | |
---|---|
public static final String | OPTIONAL_KEY |
public static final String | OPTION_NAME_KEY |
public static final String | OPTION_PARALLEL_KEY |
public static final String | UNZIP_KEY
|
公共構造函數 | |
---|---|
DynamicRemoteFileResolver () | |
DynamicRemoteFileResolver (boolean allowParallel) | |
DynamicRemoteFileResolver ( DynamicRemoteFileResolver.FileResolverLoader loader) | |
DynamicRemoteFileResolver ( DynamicRemoteFileResolver.FileResolverLoader loader, boolean allowParallel) |
公共方法 | |
---|---|
void | addExtraArgs ( extraArgs) addExtraArgs ( extraArgs) 為查詢新增額外的參數。 |
getParallelDownloads () | |
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
OPTION_NAME_KEY
public static final String OPTION_NAME_KEY
OPTION_PARALLEL_KEY
public static final String OPTION_PARALLEL_KEY
解壓縮鍵
public static final String UNZIP_KEY
公共構造函數
動態遠端文件解析器
public DynamicRemoteFileResolver ()
動態遠端文件解析器
public DynamicRemoteFileResolver (boolean allowParallel)
參數 | |
---|---|
allowParallel | boolean |
動態遠端文件解析器
public DynamicRemoteFileResolver (DynamicRemoteFileResolver.FileResolverLoader loader)
參數 | |
---|---|
loader | DynamicRemoteFileResolver.FileResolverLoader |
動態遠端文件解析器
public DynamicRemoteFileResolver (DynamicRemoteFileResolver.FileResolverLoader loader, boolean allowParallel)
參數 | |
---|---|
loader | DynamicRemoteFileResolver.FileResolverLoader |
allowParallel | boolean |
公共方法
新增額外參數
public void addExtraArgs (extraArgs)
為查詢新增額外的參數。
參數 | |
---|---|
extraArgs |
取得並行下載
publicgetParallelDownloads ()
退貨 | |
---|---|
解決部分下載Zip
public void resolvePartialDownloadZip (File destDir, String remoteZipFilePath,includeFilters, excludeFilters)
下載遠端 zip 檔案中與給定過濾器相符的檔案。
只有當遠端 zip 檔案內的檔案路徑與任何包含過濾器相符但不與排除過濾器相符時,才會下載該檔案。
參數 | |
---|---|
destDir | File :放置下載內容的檔案。 |
remoteZipFilePath | String :要下載的 zip 檔案的遠端路徑,相對於特定實作的根目錄。 |
includeFilters | |
excludeFilters |
投擲 | |
---|---|
BuildRetrievalError | 如果無法下載檔案。 |
如果需要解壓縮
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-12-01 (世界標準時間)。
[]
[]