DynamicRemoteFileResolver
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
|
상수 | |
|---|---|
String |
OPTIONAL_KEY
|
String |
OPTION_NAME_KEY
|
String |
OPTION_PARALLEL_KEY
|
String |
UNZIP_KEY
|
공개 생성자 | |
|---|---|
DynamicRemoteFileResolver()
|
|
DynamicRemoteFileResolver(boolean allowParallel)
|
|
DynamicRemoteFileResolver(DynamicRemoteFileResolver.FileResolverLoader loader)
|
|
DynamicRemoteFileResolver(DynamicRemoteFileResolver.FileResolverLoader loader, boolean allowParallel)
|
|
공개 메서드 | |
|---|---|
void
|
addExtraArgs(
쿼리에 추가 인수를 추가합니다. |
|
getParallelDownloads()
|
void
|
resolvePartialDownloadZip(File destDir, String remoteZipFilePath,
지정된 필터와 일치하는 파일을 원격 ZIP 파일로 다운로드합니다. |
void
|
setDevice(ITestDevice device)
테스트 대상 기기를 설정합니다. |
void
|
setOptionMap(
|
static
final
File
|
unzipIfRequired(File downloadedFile,
파일의 압축을 해제해야 하는지 확인하고 필요한 경우 압축을 해제할 수 있는 유틸리티입니다. |
final
|
validateRemoteFilePath()
모든 |
상수
OPTIONAL_KEY
public static final String OPTIONAL_KEY
상수 값: 'optional'
OPTION_NAME_KEY
public static final String OPTION_NAME_KEY
상수 값: 'option_name'
OPTION_PARALLEL_KEY
public static final String OPTION_PARALLEL_KEY
상수 값: 'parallel'
UNZIP_KEY
public static final String UNZIP_KEY
상수 값: 'unzip'
공개 생성자
DynamicRemoteFileResolver
public DynamicRemoteFileResolver ()
DynamicRemoteFileResolver
public DynamicRemoteFileResolver (boolean allowParallel)
| 매개변수 | |
|---|---|
allowParallel |
boolean |
DynamicRemoteFileResolver
public DynamicRemoteFileResolver (DynamicRemoteFileResolver.FileResolverLoader loader)
| 매개변수 | |
|---|---|
loader |
DynamicRemoteFileResolver.FileResolverLoader |
DynamicRemoteFileResolver
public DynamicRemoteFileResolver (DynamicRemoteFileResolver.FileResolverLoader loader, boolean allowParallel)
| 매개변수 | |
|---|---|
loader |
DynamicRemoteFileResolver.FileResolverLoader |
allowParallel |
boolean |
공개 메서드
addExtraArgs
public void addExtraArgs (extraArgs)
쿼리에 추가 인수를 추가합니다.
| 매개변수 | |
|---|---|
extraArgs |
|
getParallelDownloads
publicgetParallelDownloads ()
| 반환 값 | |
|---|---|
|
|
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 |
|
validateRemoteFilePath
public finalvalidateRemoteFilePath ()
모든 ERROR(/File) 옵션 유형을 실행하고 경로가 해결되어야 하는지 확인합니다.
| 반환 값 | |
|---|---|
|
이 방식으로 해결된 ERROR(/File) 목록입니다. |
| 생성 값 | |
|---|---|
|
com.android.tradefed.build.BuildRetrievalError |
BuildRetrievalError |
|