RemoteFileUtil
public class RemoteFileUtil
extends Object
java.lang.Object |
↳ | com.android.tradefed.device.cloud.RemoteFileUtil |
實用程序類,用於處理遠程實例中的文件
概要
公開方法 |
---|
static File | fetchRemoteDir (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteDirPath) 從遠程主機獲取遠程目錄。 |
static boolean | fetchRemoteDir (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteDirPath, File localDir) 從遠程主機獲取遠程目錄。 |
static File | fetchRemoteFile (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteFilePath) 在容器實例中獲取遠程文件。 |
static boolean | fetchRemoteFile (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteFilePath, File localFile) 在設備或容器實例中獲取遠程文件。 |
static boolean | pushFileToRemote (GceAvdInfo remoteInstance, TestDeviceOptions options, scpArgs, IRunUtil runUtil, long timeout, String remoteFilePath, File localFile) pushFileToRemote (GceAvdInfo remoteInstance, TestDeviceOptions options, scpArgs, IRunUtil runUtil, long timeout, String remoteFilePath, File localFile) 將ERROR(/File) 從本地主機推送到遠程實例 |
公共建設者
RemoteFileUtil
public RemoteFileUtil ()
公開方法
fetchRemoteDir
public static File fetchRemoteDir (GceAvdInfo remoteInstance,
TestDeviceOptions options,
IRunUtil runUtil,
long timeout,
String remoteDirPath)
從遠程主機獲取遠程目錄。
參量 |
---|
remoteInstance | GceAvdInfo :描述設備的GceAvdInfo 。 |
options | TestDeviceOptions :一個TestDeviceOptions 描述要用於GCE設備的設備選項。 |
runUtil | IRunUtil :執行命令的IRunUtil 。 |
timeout | long :以毫秒為單位的提取完成時間 |
remoteDirPath | String :查找目錄的遠程路徑。 |
fetchRemoteDir
public static boolean fetchRemoteDir (GceAvdInfo remoteInstance,
TestDeviceOptions options,
IRunUtil runUtil,
long timeout,
String remoteDirPath,
File localDir)
從遠程主機獲取遠程目錄。
參量 |
---|
remoteInstance | GceAvdInfo :描述設備的GceAvdInfo 。 |
options | TestDeviceOptions :一個TestDeviceOptions 描述要用於GCE設備的設備選項。 |
runUtil | IRunUtil :執行命令的IRunUtil 。 |
timeout | long :以毫秒為單位的提取完成時間 |
remoteDirPath | String :查找目錄的遠程路徑。 |
localDir | File :放置提取文件的本地目錄。 |
退貨 |
---|
boolean | 成功則為True,否則為False |
fetchRemoteFile
public static File fetchRemoteFile (GceAvdInfo remoteInstance,
TestDeviceOptions options,
IRunUtil runUtil,
long timeout,
String remoteFilePath)
在容器實例中獲取遠程文件。
參量 |
---|
remoteInstance | GceAvdInfo :描述設備的GceAvdInfo 。 |
options | TestDeviceOptions :一個TestDeviceOptions 描述要用於GCE設備的設備選項。 |
runUtil | IRunUtil :執行命令的IRunUtil 。 |
timeout | long :以毫秒為單位的提取完成時間 |
remoteFilePath | String :查找文件的遠程路徑。 |
fetchRemoteFile
public static boolean fetchRemoteFile (GceAvdInfo remoteInstance,
TestDeviceOptions options,
IRunUtil runUtil,
long timeout,
String remoteFilePath,
File localFile)
在設備或容器實例中獲取遠程文件。
參量 |
---|
remoteInstance | GceAvdInfo :描述設備的GceAvdInfo 。 |
options | TestDeviceOptions :一個TestDeviceOptions 描述要用於GCE設備的設備選項。 |
runUtil | IRunUtil :執行命令的IRunUtil 。 |
timeout | long :以毫秒為單位的提取完成時間 |
remoteFilePath | String :查找文件的遠程路徑。 |
localFile | File :本地ERROR(/File) ,將在其中提取遠程文件 |
退貨 |
---|
boolean | 成功則為True,否則為False |
pushFileToRemote
public static boolean pushFileToRemote (GceAvdInfo remoteInstance,
TestDeviceOptions options,
scpArgs,
IRunUtil runUtil,
long timeout,
String remoteFilePath,
File localFile)
將ERROR(/File)
從本地主機推送到遠程實例
參量 |
---|
remoteInstance | GceAvdInfo :描述設備的GceAvdInfo 。 |
options | TestDeviceOptions :一個TestDeviceOptions 描述要用於GCE設備的設備選項。 |
scpArgs | :額外的args傳遞給scp命令 |
runUtil | IRunUtil :執行命令的IRunUtil 。 |
timeout | long :以毫秒為單位的提取完成時間 |
remoteFilePath | String :查找文件的遠程路徑。 |
localFile | File :本地ERROR(/File) ,將在其中提取遠程文件 |
退貨 |
---|
boolean | 成功則為True,否則為False |