RemoteFileUtil
public class RemoteFileUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.device.cloud.RemoteFileUtil |
Classe utilitaire pour gérer le fichier à 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érez 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érez un fichier distant dans l'instance d'appareil ou de conteneur. |
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) Pousser une |
Constructeurs publics
RemoteFileUtil
public RemoteFileUtil ()
Méthodes publiques
est-ce queRemoteFileExist
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 : Le GceAvdInfo qui décrit l'appareil. |
options | TestDeviceOptions : un TestDeviceOptions décrivant les options de périphérique à utiliser pour le périphérique GCE. |
runUtil | IRunUtil : un IRunUtil pour exécuter des commandes. |
timeout | long : en millisecondes pour que la récupération se termine |
remotePath | String : Le chemin distant où trouver le fichier. |
Retour | |
---|---|
boolean | si le fichier existe ou non |
récupérerRemoteDir
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 : Le GceAvdInfo qui décrit l'appareil. |
options | TestDeviceOptions : un TestDeviceOptions décrivant les options de périphérique à utiliser pour le périphérique GCE. |
runUtil | IRunUtil : un IRunUtil pour exécuter des commandes. |
timeout | long : en millisecondes pour que la récupération se termine |
remoteDirPath | String : Le chemin distant où trouver le répertoire. |
Retour | |
---|---|
File | Le répertoire extrait ERROR(/File) en cas de succès, null sinon |
récupérerRemoteDir
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 : Le GceAvdInfo qui décrit l'appareil. |
options | TestDeviceOptions : un TestDeviceOptions décrivant les options de périphérique à utiliser pour le périphérique GCE. |
runUtil | IRunUtil : un IRunUtil pour exécuter des commandes. |
timeout | long : en millisecondes pour que la récupération se termine |
remoteDirPath | String : Le chemin distant où trouver le répertoire. |
localDir | File : Le répertoire local où mettre les fichiers extraits. |
Retour | |
---|---|
boolean | Vrai en cas de succès, Faux sinon |
récupérerFichierDistant
public static File fetchRemoteFile (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteFilePath)
Récupérez un fichier distant dans l'instance de conteneur.
Paramètres | |
---|---|
remoteInstance | GceAvdInfo : Le GceAvdInfo qui décrit l'appareil. |
options | TestDeviceOptions : un TestDeviceOptions décrivant les options de périphérique à utiliser pour le périphérique GCE. |
runUtil | IRunUtil : un IRunUtil pour exécuter des commandes. |
timeout | long : en millisecondes pour que la récupération se termine |
remoteFilePath | String : Le chemin distant où trouver le fichier. |
Retour | |
---|---|
File | Le pull déposé si réussi, nul sinon |
récupérerFichierDistant
public static boolean fetchRemoteFile (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteFilePath, File localFile)
Récupérez un fichier distant dans l'instance d'appareil ou de conteneur.
Paramètres | |
---|---|
remoteInstance | GceAvdInfo : Le GceAvdInfo qui décrit l'appareil. |
options | TestDeviceOptions : un TestDeviceOptions décrivant les options de périphérique à utiliser pour le périphérique GCE. |
runUtil | IRunUtil : un IRunUtil pour exécuter des commandes. |
timeout | long : en millisecondes pour que la récupération se termine |
remoteFilePath | String : Le chemin distant où trouver le fichier. |
localFile | File : L' ERROR(/File) où le fichier distant sera extrait |
Retour | |
---|---|
boolean | Vrai en cas de succès, Faux sinon |
pushFileToRemote
public static boolean pushFileToRemote (GceAvdInfo remoteInstance, TestDeviceOptions options,scpArgs, IRunUtil runUtil, long timeout, String remoteFilePath, File localFile)
Pousser une ERROR(/File)
de l'hôte local vers l'instance distante
Paramètres | |
---|---|
remoteInstance | GceAvdInfo : Le GceAvdInfo qui décrit l'appareil. |
options | TestDeviceOptions : un TestDeviceOptions décrivant les options de périphérique à utiliser pour le périphérique GCE. |
scpArgs | |
runUtil | IRunUtil : un IRunUtil pour exécuter des commandes. |
timeout | long : en millisecondes pour que la récupération se termine |
remoteFilePath | String : Le chemin distant où trouver le fichier. |
localFile | File : L' ERROR(/File) où le fichier distant sera extrait |
Retour | |
---|---|
boolean | Vrai en cas de succès, Faux sinon |