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 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 de périphérique 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) Envoyer une |
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 répertoire) existe sur l'instance distante
Paramètres | |
---|---|
remoteInstance | GceAvdInfo : Le GceAvdInfo qui décrit le périphérique. |
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 soit terminée |
remotePath | String : Le chemin distant où trouver le fichier. |
Retour | |
---|---|
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 : Le GceAvdInfo qui décrit le périphérique. |
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 soit terminée |
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 |
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 : Le GceAvdInfo qui décrit le périphérique. |
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 soit terminée |
remoteDirPath | String : Le chemin distant où trouver le répertoire. |
localDir | File : Le répertoire local où placer les fichiers extraits. |
Retour | |
---|---|
boolean | Vrai en cas de succès, Faux sinon |
fetchRemoteFile
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 le périphérique. |
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 soit terminée |
remoteFilePath | String : Le chemin distant où trouver le fichier. |
Retour | |
---|---|
File | Le retrait est déposé en cas de succès, nul sinon |
fetchRemoteFile
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 de périphérique ou de conteneur.
Paramètres | |
---|---|
remoteInstance | GceAvdInfo : Le GceAvdInfo qui décrit le périphérique. |
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 soit terminée |
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)
Envoyer une ERROR(/File)
de l'hôte local vers l'instance distante
Paramètres | |
---|---|
remoteInstance | GceAvdInfo : Le GceAvdInfo qui décrit le périphérique. |
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 soit terminée |
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 |