リモートファイルユーティリティ

public class RemoteFileUtil
extends Object

java.lang.オブジェクト
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)

ローカルホストからリモートインスタンスにERROR(/File)をプッシュします。

パブリックコンストラクター

リモートファイルユーティリティ

public RemoteFileUtil ()

パブリックメソッド

リモートファイルは存在しますか

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 : scp コマンドに渡される追加の引数

runUtil IRunUtil : コマンドを実行するためのIRunUtil

timeout long : フェッチが完了するまでのミリ秒単位

remoteFilePath String : ファイルを見つけるリモート パス。

localFile File : リモート ファイルがプルされるローカルERROR(/File)

戻り値
boolean成功した場合は True、それ以外の場合は False