ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release แทน aosp-main เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
RemoteFileUtil
public
class
RemoteFileUtil
extends Object
| java.lang.Object
|
| ↳ |
com.android.tradefed.device.cloud.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 |
จริงหากสําเร็จ เป็นเท็จหากไม่สําเร็จ |
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[]]