RemoteFileUtil
public class RemoteFileUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.device.cloud.RemoteFileUtil |
リモート インスタンスからファイルを処理するユーティリティ クラス
まとめ
パブリック コンストラクター | |
---|---|
RemoteFileUtil () |
公開メソッド | |
---|---|
static boolean | doesRemoteFileExist ( GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remotePath) リモート インスタンスにファイル (またはディレクトリ) が存在するかどうかを確認する |
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) |
パブリック コンストラクター
RemoteFileUtil
public RemoteFileUtil ()
公開メソッド
doesRemoteFileExist
public static boolean doesRemoteFileExist (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remotePath)
リモート インスタンスにファイル (またはディレクトリ) が存在するかどうかを確認する
パラメーター | |
---|---|
remoteInstance | GceAvdInfo : デバイスを説明するGceAvdInfo 。 |
options | TestDeviceOptions : GCE デバイスに使用されるデバイス オプションを記述するTestDeviceOptions 。 |
runUtil | IRunUtil : コマンドを実行するためのIRunUtil 。 |
timeout | long : フェッチが完了するまでのミリ秒 |
remotePath | String : ファイルを検索するリモート パス。 |
戻り値 | |
---|---|
boolean | ファイルが存在するかどうか |
fetchRemoteDir
public static File fetchRemoteDir (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteDirPath)
リモート ホストからリモート ディレクトリを取得します。
パラメーター | |
---|---|
remoteInstance | GceAvdInfo : デバイスを説明するGceAvdInfo 。 |
options | TestDeviceOptions : GCE デバイスに使用されるデバイス オプションを記述するTestDeviceOptions 。 |
runUtil | IRunUtil : コマンドを実行するためのIRunUtil 。 |
timeout | long : フェッチが完了するまでのミリ秒 |
remoteDirPath | String : ディレクトリを検索するリモート パス。 |
戻り値 | |
---|---|
File | プルされたディレクトリERROR(/File) 成功した場合、それ以外の場合は null |
fetchRemoteDir
public static boolean fetchRemoteDir (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteDirPath, File localDir)
リモート ホストからリモート ディレクトリを取得します。
パラメーター | |
---|---|
remoteInstance | GceAvdInfo : デバイスを説明するGceAvdInfo 。 |
options | TestDeviceOptions : GCE デバイスに使用されるデバイス オプションを記述するTestDeviceOptions 。 |
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 : GCE デバイスに使用されるデバイス オプションを記述するTestDeviceOptions 。 |
runUtil | IRunUtil : コマンドを実行するためのIRunUtil 。 |
timeout | long : フェッチが完了するまでのミリ秒 |
remoteFilePath | String : ファイルを検索するリモート パス。 |
戻り値 | |
---|---|
File | 成功した場合はプルされたフィールド、それ以外の場合は null |
fetchRemoteFile
public static boolean fetchRemoteFile (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteFilePath, File localFile)
デバイスまたはコンテナー インスタンスでリモート ファイルをフェッチします。
パラメーター | |
---|---|
remoteInstance | GceAvdInfo : デバイスを説明するGceAvdInfo 。 |
options | TestDeviceOptions : GCE デバイスに使用されるデバイス オプションを記述するTestDeviceOptions 。 |
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 : GCE デバイスに使用されるデバイス オプションを記述するTestDeviceOptions 。 |
scpArgs | |
runUtil | IRunUtil : コマンドを実行するためのIRunUtil 。 |
timeout | long : フェッチが完了するまでのミリ秒 |
remoteFilePath | String : ファイルを検索するリモート パス。 |
localFile | File : リモート ファイルがプルされるローカルERROR(/File) |
戻り値 | |
---|---|
boolean | 成功した場合は True、それ以外の場合は False |