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) พุช |
ผู้รับเหมาก่อสร้างสาธารณะ
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 | ไม่ว่าไฟล์นั้นมีอยู่หรือไม่ก็ตาม |
ดึงRemoteDir
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) หากสำเร็จ มิฉะนั้นจะเป็นโมฆะ |
ดึงRemoteDir
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 | |
runUtil | IRunUtil : IRunUtil เพื่อรันคำสั่ง |
timeout | long : เป็นมิลลิวินาทีเพื่อให้การดึงข้อมูลเสร็จสมบูรณ์ |
remoteFilePath | String : เส้นทางระยะไกลที่จะค้นหาไฟล์ |
localFile | File : ERROR(/File) ที่จะดึงไฟล์ระยะไกล |
การส่งคืน | |
---|---|
boolean | เป็นจริงหากสำเร็จ มิฉะนั้นจะเป็นเท็จ |