IRemoteFileResolver
public interface IRemoteFileResolver
com.android.tradefed.config.remote.IRemoteFileResolver |
可以將遠程文件解析為本地文件的對象的接口。例如:gs://bucket/dir/file.txt 將被下載並更改為本地路徑。
概括
嵌套類 | |
---|---|
class | IRemoteFileResolver.RemoteFileResolverArgs 傳遞給解析器的參數 |
class | IRemoteFileResolver.ResolvedFile 包含有關已解析文件和一些元數據的信息的類。 |
公共方法 | |
---|---|
abstract String | getSupportedProtocol () 返回支持下載的關聯協議。 |
default IRemoteFileResolver.ResolvedFile | resolveRemoteFile ( IRemoteFileResolver.RemoteFileResolverArgs args) 在面向未來的界面中解析遠程文件 |
default File | resolveRemoteFiles (File consideredFile) 解析遠程文件。 |
default File | resolveRemoteFiles (File consideredFile, queryArgs) resolveRemoteFiles (File consideredFile, queryArgs) 解析遠程文件。 |
default void | setPrimaryDevice ( ITestDevice device) 實現接收被測設備的 {@ink ITestDevice} 表示的可選方式。 |
公共方法
獲取支持協議
public abstract String getSupportedProtocol ()
返回支持下載的關聯協議。
退貨 | |
---|---|
String |
解析遠程文件
public IRemoteFileResolver.ResolvedFile resolveRemoteFile (IRemoteFileResolver.RemoteFileResolverArgs args)
在面向未來的界面中解析遠程文件
參數 | |
---|---|
args | IRemoteFileResolver.RemoteFileResolverArgs : RemoteFileResolverArgs 描述遠程下載以及如何下載。 |
退貨 | |
---|---|
IRemoteFileResolver.ResolvedFile | 已解析的本地文件表示。 |
投擲 | |
---|---|
BuildRetrievalError | 如果出現問題。 |
解析遠程文件
public File resolveRemoteFiles (File consideredFile)
解析遠程文件。
參數 | |
---|---|
consideredFile | File : ERROR(/File) 評估為遠程。 |
退貨 | |
---|---|
File | 解析的本地文件。 |
投擲 | |
---|---|
BuildRetrievalError | 如果出現問題。 |
解析遠程文件
public File resolveRemoteFiles (File consideredFile,queryArgs)
解析遠程文件。
參數 | |
---|---|
consideredFile | File : ERROR(/File) 評估為遠程。 |
queryArgs |
退貨 | |
---|---|
File | 解析的本地文件。 |
投擲 | |
---|---|
BuildRetrievalError | 如果出現問題。 |
設置主設備
public void setPrimaryDevice (ITestDevice device)
實現接收被測設備的 {@ink ITestDevice} 表示的可選方式。
參數 | |
---|---|
device | ITestDevice :當前調用的ITestDevice 。 |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。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":"其他"
}]