RemoteFileUtil

public class RemoteFileUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.cloud.RemoteFileUtil


Lớp tiện ích để xử lý tệp từ một thực thể từ xa

Tóm tắt

Hàm khởi tạo công khai

RemoteFileUtil()

Phương thức công khai

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

Kiểm tra xem tệp (hoặc thư mục) có tồn tại trên phiên bản từ xa hay không

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

Tìm nạp thư mục từ xa từ máy chủ từ xa.

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

Tìm nạp thư mục từ xa từ máy chủ từ xa.

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

Tìm nạp tệp từ xa trong thực thể vùng chứa.

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

Tìm nạp tệp từ xa trong thực thể thiết bị hoặc vùng chứa.

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

Đẩy ERROR(/File) từ máy chủ cục bộ đến thực thể từ xa

Hàm khởi tạo công khai

RemoteFileUtil

public RemoteFileUtil ()

Phương thức công khai

doesRemoteFileExist

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

Kiểm tra xem tệp (hoặc thư mục) có tồn tại trên phiên bản từ xa hay không

Tham số
remoteInstance GceAvdInfo: GceAvdInfo mô tả thiết bị.

options TestDeviceOptions: TestDeviceOptions mô tả các tuỳ chọn thiết bị sẽ được sử dụng cho thiết bị GCE.

runUtil IRunUtil: IRunUtil để thực thi các lệnh.

timeout long: tính bằng mili giây để quá trình tìm nạp hoàn tất

remotePath String: Đường dẫn từ xa để tìm tệp.

Giá trị trả về
boolean liệu tệp có tồn tại hay không

fetchRemoteDir

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

Tìm nạp thư mục từ xa từ máy chủ từ xa.

Tham số
remoteInstance GceAvdInfo: GceAvdInfo mô tả thiết bị.

options TestDeviceOptions: TestDeviceOptions mô tả các tuỳ chọn thiết bị sẽ được sử dụng cho thiết bị GCE.

runUtil IRunUtil: IRunUtil để thực thi các lệnh.

timeout long: tính bằng mili giây để quá trình tìm nạp hoàn tất

remoteDirPath String: Đường dẫn từ xa để tìm thư mục.

Giá trị trả về
File Thư mục được lấy ERROR(/File) nếu thành công, rỗng nếu không

fetchRemoteDir

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

Tìm nạp thư mục từ xa từ máy chủ từ xa.

Tham số
remoteInstance GceAvdInfo: GceAvdInfo mô tả thiết bị.

options TestDeviceOptions: TestDeviceOptions mô tả các tuỳ chọn thiết bị sẽ được sử dụng cho thiết bị GCE.

runUtil IRunUtil: IRunUtil để thực thi các lệnh.

timeout long: tính bằng mili giây để quá trình tìm nạp hoàn tất

remoteDirPath String: Đường dẫn từ xa để tìm thư mục.

localDir File: Thư mục cục bộ để đặt các tệp đã lấy.

Giá trị trả về
boolean Đúng nếu thành công, Sai nếu không thành công

fetchRemoteFile

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

Tìm nạp tệp từ xa trong thực thể vùng chứa.

Tham số
remoteInstance GceAvdInfo: GceAvdInfo mô tả thiết bị.

options TestDeviceOptions: TestDeviceOptions mô tả các tuỳ chọn thiết bị sẽ được sử dụng cho thiết bị GCE.

runUtil IRunUtil: IRunUtil để thực thi các lệnh.

timeout long: tính bằng mili giây để quá trình tìm nạp hoàn tất

remoteFilePath String: Đường dẫn từ xa để tìm tệp.

Giá trị trả về
File Tệp đã được lấy nếu thành công, nếu không thì giá trị sẽ là rỗng

fetchRemoteFile

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

Tìm nạp tệp từ xa trong thực thể thiết bị hoặc vùng chứa.

Tham số
remoteInstance GceAvdInfo: GceAvdInfo mô tả thiết bị.

options TestDeviceOptions: TestDeviceOptions mô tả các tuỳ chọn thiết bị sẽ được sử dụng cho thiết bị GCE.

runUtil IRunUtil: IRunUtil để thực thi các lệnh.

timeout long: tính bằng mili giây để quá trình tìm nạp hoàn tất

remoteFilePath String: Đường dẫn từ xa để tìm tệp.

localFile File: ERROR(/File) cục bộ nơi tệp từ xa sẽ được lấy

Giá trị trả về
boolean Đúng nếu thành công, Sai nếu không thành công

pushFileToRemote

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

Đẩy ERROR(/File) từ máy chủ cục bộ đến thực thể từ xa

Tham số
remoteInstance GceAvdInfo: GceAvdInfo mô tả thiết bị.

options TestDeviceOptions: TestDeviceOptions mô tả các tuỳ chọn thiết bị sẽ được sử dụng cho thiết bị GCE.

scpArgs : các đối số bổ sung sẽ được truyền đến lệnh scp

runUtil IRunUtil: IRunUtil để thực thi các lệnh.

timeout long: tính bằng mili giây để quá trình tìm nạp hoàn tất

remoteFilePath String: Đường dẫn từ xa để tìm tệp.

localFile File: ERROR(/File) cục bộ nơi tệp từ xa sẽ được lấy

Giá trị trả về
boolean Đúng nếu thành công, Sai nếu không thành công