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)

دفع ERROR(/File) من المضيف المحلي إلى المثيل البعيد

وظائف الإنشاء العامة

RemoteFileUtil

public RemoteFileUtil ()

الطرق العامة

doesRemoteFileExist

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

التحقّق مما إذا كان هناك ملف (أو دليل) في المثيل البعيد

المعلمات
remoteInstance GceAvdInfo: GceAvdInfo التي تصف الجهاز

options TestDeviceOptions: TestDeviceOptions يصف خيارات الجهاز التي سيتم استخدامها لجهاز GCE.

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: TestDeviceOptions يصف خيارات الجهاز التي سيتم استخدامها لجهاز GCE.

runUtil IRunUtil: IRunUtil لتنفيذ الأوامر

timeout long: بالملي ثانية لإكمال عملية الجلب

remoteDirPath String: المسار البعيد الذي يمكن العثور فيه على الدليل

المرتجعات
File الدليل الذي تم سحبه ERROR(/File) في حال نجاح العملية، أو قيمة فارغة في حال عدم نجاحها

fetchRemoteDir

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

استرجاع دليل بعيد من المضيف البعيد

المعلمات
remoteInstance GceAvdInfo: GceAvdInfo التي تصف الجهاز

options TestDeviceOptions: TestDeviceOptions يصف خيارات الجهاز التي سيتم استخدامها لجهاز GCE.

runUtil IRunUtil: IRunUtil لتنفيذ الأوامر

timeout long: بالملي ثانية لإكمال عملية الجلب

remoteDirPath String: المسار البعيد الذي يمكن العثور فيه على الدليل

localDir File: الدليل المحلي الذي سيتم وضع الملفات التي تم استرجاعها فيه

المرتجعات
boolean صحيح إذا كان الإجراء ناجحًا، وخطأ في الحالات الأخرى

fetchRemoteFile

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

استرجاع ملف عن بُعد في مثيل الحاوية

المعلمات
remoteInstance GceAvdInfo: GceAvdInfo التي تصف الجهاز

options TestDeviceOptions: TestDeviceOptions يصف خيارات الجهاز التي سيتم استخدامها لجهاز GCE.

runUtil IRunUtil: IRunUtil لتنفيذ الأوامر

timeout long: بالملي ثانية لإكمال عملية الجلب

remoteFilePath String: المسار البعيد الذي يمكن العثور فيه على الملف

المرتجعات
File الملف الذي تم استرجاعه في حال نجاح العملية، أو قيمة فارغة في حال عدم نجاحها

fetchRemoteFile

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

جلب ملف عن بُعد في الجهاز أو مثيل الحاوية

المعلمات
remoteInstance GceAvdInfo: GceAvdInfo التي تصف الجهاز

options TestDeviceOptions: TestDeviceOptions يصف خيارات الجهاز التي سيتم استخدامها لجهاز GCE.

runUtil IRunUtil: IRunUtil لتنفيذ الأوامر

timeout long: بالملي ثانية لإكمال عملية الجلب

remoteFilePath String: المسار البعيد الذي يمكن العثور فيه على الملف

localFile File: ERROR(/File) المحلي الذي سيتم سحب الملف البعيد منه

المرتجعات
boolean صحيح إذا كان الإجراء ناجحًا، وخطأ في الحالات الأخرى

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: TestDeviceOptions يصف خيارات الجهاز التي سيتم استخدامها لجهاز GCE.

scpArgs : وسيطات إضافية يتم تمريرها إلى الأمر scp

runUtil IRunUtil: IRunUtil لتنفيذ الأوامر

timeout long: بالملي ثانية لإكمال عملية الجلب

remoteFilePath String: المسار البعيد الذي يمكن العثور فيه على الملف

localFile File: ERROR(/File) المحلي الذي سيتم سحب الملف البعيد منه

المرتجعات
boolean صحيح إذا كان الإجراء ناجحًا، وخطأ في الحالات الأخرى