动态远程文件解析器
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 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-10-14。
[{
"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":"其他"
}]