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 phiên bản từ xa
Bản tóm tắt
Nhà thầu xây dựng công cộng | |
---|---|
RemoteFileUtil () |
Phương pháp 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 không |
static File | fetchRemoteDir ( GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteDirPath) Lấy một 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) Lấy một 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 một tệp từ xa trong phiên bản 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 phiên bản 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) pushFileToRemote ( GceAvdInfo remoteInstance, TestDeviceOptions options, scpArgs, IRunUtil runUtil, long timeout, String remoteFilePath, File localFile) Đẩy |
Nhà thầu xây dựng công cộng
RemoteFileUtil
public RemoteFileUtil ()
Phương pháp công khai
hiệnRemoteFileExist
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 không
Thông số | |
---|---|
remoteInstance | GceAvdInfo : GceAvdInfo mô tả thiết bị. |
options | TestDeviceOptions : TestDeviceOptions mô tả các tùy chọn thiết bị sẽ được sử dụng cho thiết bị GCE. |
runUtil | IRunUtil : IRunUtil để thực thi 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 nơi tìm tệp. |
Trả lại | |
---|---|
boolean | tập tin có tồn tại hay không |
tìm nạpRemoteDir
public static File fetchRemoteDir (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteDirPath)
Lấy một thư mục từ xa từ máy chủ từ xa.
Thông số | |
---|---|
remoteInstance | GceAvdInfo : GceAvdInfo mô tả thiết bị. |
options | TestDeviceOptions : TestDeviceOptions mô tả các tùy chọn thiết bị sẽ được sử dụng cho thiết bị GCE. |
runUtil | IRunUtil : IRunUtil để thực thi 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 nơi tìm thư mục. |
Trả lại | |
---|---|
File | Thư mục được kéo ERROR(/File) nếu thành công, nếu không thì null |
tìm nạpRemoteDir
public static boolean fetchRemoteDir (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteDirPath, File localDir)
Lấy một thư mục từ xa từ máy chủ từ xa.
Thông số | |
---|---|
remoteInstance | GceAvdInfo : GceAvdInfo mô tả thiết bị. |
options | TestDeviceOptions : TestDeviceOptions mô tả các tùy chọn thiết bị sẽ được sử dụng cho thiết bị GCE. |
runUtil | IRunUtil : IRunUtil để thực thi 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 nơi tìm thư mục. |
localDir | File : Thư mục cục bộ nơi đặt các tệp đã kéo. |
Trả lại | |
---|---|
boolean | Đúng nếu thành công, Sai nếu không |
tìm nạpRemoteFile
public static File fetchRemoteFile (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteFilePath)
Tìm nạp một tệp từ xa trong phiên bản vùng chứa.
Thông số | |
---|---|
remoteInstance | GceAvdInfo : GceAvdInfo mô tả thiết bị. |
options | TestDeviceOptions : TestDeviceOptions mô tả các tùy chọn thiết bị sẽ được sử dụng cho thiết bị GCE. |
runUtil | IRunUtil : IRunUtil để thực thi 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 nơi tìm tệp. |
Trả lại | |
---|---|
File | Việc kéo nộp nếu thành công, nếu không thì null |
tìm nạpRemoteFile
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 phiên bản thiết bị hoặc vùng chứa.
Thông số | |
---|---|
remoteInstance | GceAvdInfo : GceAvdInfo mô tả thiết bị. |
options | TestDeviceOptions : TestDeviceOptions mô tả các tùy chọn thiết bị sẽ được sử dụng cho thiết bị GCE. |
runUtil | IRunUtil : IRunUtil để thực thi 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 nơi tìm tệp. |
localFile | File : ERROR(/File) cục bộ nơi tệp từ xa sẽ được kéo |
Trả lại | |
---|---|
boolean | Đúng nếu thành công, Sai nếu không |
đẩyFileToRemote
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ộ sang phiên bản từ xa
Thông số | |
---|---|
remoteInstance | GceAvdInfo : GceAvdInfo mô tả thiết bị. |
options | TestDeviceOptions : TestDeviceOptions mô tả các tùy chọn thiết bị sẽ được sử dụng cho thiết bị GCE. |
scpArgs | |
runUtil | IRunUtil : IRunUtil để thực thi 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 nơi tìm tệp. |
localFile | File : ERROR(/File) cục bộ nơi tệp từ xa sẽ được kéo |
Trả lại | |
---|---|
boolean | Đúng nếu thành công, Sai nếu không |