Tập Tin Từ XaUtil
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 công cộng | |
---|---|
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 một 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) Tìm nạp 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) Tìm nạp 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 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 bộ 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 công cộng
Tập Tin Từ XaUtil
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 một 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 : một TestDeviceOptions mô tả các tùy chọn thiết bị sẽ được sử dụng cho thiết bị GCE. |
runUtil | IRunUtil : một 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 để 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)
Tìm nạp 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 : một TestDeviceOptions mô tả các tùy chọn thiết bị sẽ được sử dụng cho thiết bị GCE. |
runUtil | IRunUtil : một 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 để tìm thư mục. |
trả lại | |
---|---|
File | Thư mục được kéo ERROR(/File) nếu thành công, null nếu không |
tìm nạpRemoteDir
public static boolean fetchRemoteDir (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeout, String remoteDirPath, File localDir)
Tìm nạp 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 : một TestDeviceOptions mô tả các tùy chọn thiết bị sẽ được sử dụng cho thiết bị GCE. |
runUtil | IRunUtil : một 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 để 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 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 : một TestDeviceOptions mô tả các tùy chọn thiết bị sẽ được sử dụng cho thiết bị GCE. |
runUtil | IRunUtil : một 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 để tìm tệp. |
trả lại | |
---|---|
File | Tệp được kéo nếu thành công, null nếu không |
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 bộ chứa.
Thông số | |
---|---|
remoteInstance | GceAvdInfo : GceAvdInfo mô tả thiết bị. |
options | TestDeviceOptions : một TestDeviceOptions mô tả các tùy chọn thiết bị sẽ được sử dụng cho thiết bị GCE. |
runUtil | IRunUtil : một 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 để tìm tệp. |
localFile | File : ERROR(/File) 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 |
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ộ sang phiên bản từ xa
Thông số | |
---|---|
remoteInstance | GceAvdInfo : GceAvdInfo mô tả thiết bị. |
options | TestDeviceOptions : một 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 : một 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 để tìm tệp. |
localFile | File : ERROR(/File) 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 |