RemoteFileUtil

public class RemoteFileUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.cloud.RemoteFileUtil


Classe utilitaire permettant de gérer les fichiers à partir d'une instance distante

Résumé

Constructeurs publics

RemoteFileUtil()

Méthodes publiques

static boolean doesRemoteFileExist(GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remotePath)

Vérifier si un fichier (ou un répertoire) existe sur l'instance distante

static File fetchRemoteDir(GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteDirPath)

Récupérez un répertoire distant à partir de l'hôte distant.

static boolean fetchRemoteDir(GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteDirPath, File localDir)

Récupérez un répertoire distant à partir de l'hôte distant.

static File fetchRemoteFile(GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteFilePath)

Récupérer un fichier distant dans l'instance de conteneur

static boolean fetchRemoteFile(GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteFilePath, File localFile)

Récupérer un fichier distant dans l'instance de l'appareil ou du conteneur

static boolean pushFileToRemote(GceAvdInfo remoteInstance, TestDeviceOptions options, scpArgs, IRunUtil runUtil, long timeout, String remoteFilePath, File localFile)

Transférer un ERROR(/File) de l'hôte local vers l'instance distante

Constructeurs publics

RemoteFileUtil

public RemoteFileUtil ()

Méthodes publiques

doesRemoteFileExist

public static boolean doesRemoteFileExist (GceAvdInfo remoteInstance, 
                TestDeviceOptions options, 
                IRunUtil runUtil, 
                long timeout, 
                String remotePath)

Vérifier si un fichier (ou un répertoire) existe sur l'instance distante

Paramètres
remoteInstance GceAvdInfo: GceAvdInfo qui décrit l'appareil.

options TestDeviceOptions: TestDeviceOptions décrivant les options d'appareil à utiliser pour l'appareil GCE.

runUtil IRunUtil: IRunUtil permettant d'exécuter des commandes.

timeout long: en millisecondes pour l'extraction

remotePath String: chemin d'accès distant du fichier.

Renvoie
boolean si le fichier existe ou non

fetchRemoteDir

public static File fetchRemoteDir (GceAvdInfo remoteInstance, 
                TestDeviceOptions options, 
                IRunUtil runUtil, 
                long timeout, 
                String remoteDirPath)

Récupérez un répertoire distant à partir de l'hôte distant.

Paramètres
remoteInstance GceAvdInfo: GceAvdInfo qui décrit l'appareil.

options TestDeviceOptions: TestDeviceOptions décrivant les options d'appareil à utiliser pour l'appareil GCE.

runUtil IRunUtil: IRunUtil permettant d'exécuter des commandes.

timeout long: en millisecondes pour l'extraction

remoteDirPath String: chemin d'accès distant du répertoire.

Renvoie
File Le répertoire ERROR(/File) extrait si la requête aboutit, sinon "null"

fetchRemoteDir

public static boolean fetchRemoteDir (GceAvdInfo remoteInstance, 
                TestDeviceOptions options, 
                IRunUtil runUtil, 
                long timeout, 
                String remoteDirPath, 
                File localDir)

Récupérez un répertoire distant à partir de l'hôte distant.

Paramètres
remoteInstance GceAvdInfo: GceAvdInfo qui décrit l'appareil.

options TestDeviceOptions: TestDeviceOptions décrivant les options d'appareil à utiliser pour l'appareil GCE.

runUtil IRunUtil: IRunUtil permettant d'exécuter des commandes.

timeout long: en millisecondes pour l'extraction

remoteDirPath String: chemin d'accès distant du répertoire.

localDir File: répertoire local dans lequel placer les fichiers extraits.

Renvoie
boolean "True" si la requête a réussi, "False" dans le cas contraire

fetchRemoteFile

public static File fetchRemoteFile (GceAvdInfo remoteInstance, 
                TestDeviceOptions options, 
                IRunUtil runUtil, 
                long timeout, 
                String remoteFilePath)

Récupérer un fichier distant dans l'instance de conteneur

Paramètres
remoteInstance GceAvdInfo: GceAvdInfo qui décrit l'appareil.

options TestDeviceOptions: TestDeviceOptions décrivant les options d'appareil à utiliser pour l'appareil GCE.

runUtil IRunUtil: IRunUtil permettant d'exécuter des commandes.

timeout long: en millisecondes pour l'extraction

remoteFilePath String: chemin d'accès distant du fichier.

Renvoie
File Le champ extrait en cas de réussite, ou "null" dans le cas contraire

fetchRemoteFile

public static boolean fetchRemoteFile (GceAvdInfo remoteInstance, 
                TestDeviceOptions options, 
                IRunUtil runUtil, 
                long timeout, 
                String remoteFilePath, 
                File localFile)

Récupérer un fichier distant dans l'instance de l'appareil ou du conteneur

Paramètres
remoteInstance GceAvdInfo: GceAvdInfo qui décrit l'appareil.

options TestDeviceOptions: TestDeviceOptions décrivant les options d'appareil à utiliser pour l'appareil GCE.

runUtil IRunUtil: IRunUtil permettant d'exécuter des commandes.

timeout long: en millisecondes pour l'extraction

remoteFilePath String: chemin d'accès distant du fichier.

localFile File: ERROR(/File) local à partir duquel le fichier distant sera extrait

Renvoie
boolean "True" si la requête a réussi, "False" dans le cas contraire

pushFileToRemote

public static boolean pushFileToRemote (GceAvdInfo remoteInstance, 
                TestDeviceOptions options, 
                 scpArgs, 
                IRunUtil runUtil, 
                long timeout, 
                String remoteFilePath, 
                File localFile)

Transférer un ERROR(/File) de l'hôte local vers l'instance distante

Paramètres
remoteInstance GceAvdInfo: GceAvdInfo qui décrit l'appareil.

options TestDeviceOptions: TestDeviceOptions décrivant les options d'appareil à utiliser pour l'appareil GCE.

scpArgs : arguments supplémentaires à transmettre à la commande scp

runUtil IRunUtil: IRunUtil permettant d'exécuter des commandes.

timeout long: en millisecondes pour l'extraction

remoteFilePath String: chemin d'accès distant du fichier.

localFile File: ERROR(/File) local à partir duquel le fichier distant sera extrait

Renvoie
boolean "True" si la requête a réussi, "False" dans le cas contraire