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) pushFileToRemote ( GceAvdInfo remoteInstance, TestDeviceOptions options, scpArgs, IRunUtil runUtil, long timeout, String remoteFilePath, File localFile)

พุช ERROR(/File) จากโลคัลโฮสต์ไปยังอินสแตนซ์ระยะไกล

ผู้สร้างสาธารณะ

RemoteFileUtil

public RemoteFileUtil ()

วิธีการสาธารณะ

ไม่RemoteFileExist

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) หากสำเร็จ มิฉะนั้นจะเป็นค่า null

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 : args พิเศษที่จะส่งผ่านไปยังคำสั่ง scp

runUtil IRunUtil : IRunUtil เพื่อรันคำสั่ง

timeout long : หน่วยเป็นมิลลิวินาทีเพื่อให้การดึงข้อมูลเสร็จสิ้น

remoteFilePath String : เส้นทางระยะไกลที่จะค้นหาไฟล์

localFile File : ERROR(/File) ที่ไฟล์ระยะไกลจะถูกดึง

ส่งคืน
boolean จริงหากสำเร็จ มิฉะนั้นจะเป็นเท็จ