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)

로컬 호스트에서 원격 인스턴스로 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: GCE 기기에 사용할 기기 옵션을 설명하는 TestDeviceOptions입니다.

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: GCE 기기에 사용할 기기 옵션을 설명하는 TestDeviceOptions입니다.

runUtil IRunUtil: 명령어를 실행하는 IRunUtil입니다.

timeout long: 가져오기가 완료되는 데 걸린 시간(밀리초)

remoteDirPath String: 디렉터리를 찾을 원격 경로입니다.

반환 값
File 성공하면 가져온 디렉터리 ERROR(/File)이고 그렇지 않으면 null입니다.

fetchRemoteDir

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

원격 호스트에서 원격 디렉터리를 가져옵니다.

매개변수
remoteInstance GceAvdInfo: 기기를 설명하는 GceAvdInfo입니다.

options TestDeviceOptions: GCE 기기에 사용할 기기 옵션을 설명하는 TestDeviceOptions입니다.

runUtil IRunUtil: 명령어를 실행하는 IRunUtil입니다.

timeout long: 가져오기가 완료되는 데 걸린 시간(밀리초)

remoteDirPath String: 디렉터리를 찾을 원격 경로입니다.

localDir File: 가져온 파일을 배치할 로컬 디렉터리입니다.

반환 값
boolean 성공하면 true를 반환하고 그렇지 않으면 false를 반환합니다.

fetchRemoteFile

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

컨테이너 인스턴스에서 원격 파일을 가져옵니다.

매개변수
remoteInstance GceAvdInfo: 기기를 설명하는 GceAvdInfo입니다.

options TestDeviceOptions: GCE 기기에 사용할 기기 옵션을 설명하는 TestDeviceOptions입니다.

runUtil IRunUtil: 명령어를 실행하는 IRunUtil입니다.

timeout long: 가져오기가 완료되는 데 걸린 시간(밀리초)

remoteFilePath String: 파일을 찾을 원격 경로입니다.

반환 값
File 성공하면 가져온 파일, 그렇지 않으면 null

fetchRemoteFile

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

기기 또는 컨테이너 인스턴스에서 원격 파일을 가져옵니다.

매개변수
remoteInstance GceAvdInfo: 기기를 설명하는 GceAvdInfo입니다.

options TestDeviceOptions: GCE 기기에 사용할 기기 옵션을 설명하는 TestDeviceOptions입니다.

runUtil IRunUtil: 명령어를 실행하는 IRunUtil입니다.

timeout long: 가져오기가 완료되는 데 걸린 시간(밀리초)

remoteFilePath String: 파일을 찾을 원격 경로입니다.

localFile File: 원격 파일이 가져올 로컬 ERROR(/File)입니다.

반환 값
boolean 성공하면 true를 반환하고 그렇지 않으면 false를 반환합니다.

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: GCE 기기에 사용할 기기 옵션을 설명하는 TestDeviceOptions입니다.

scpArgs : scp 명령어에 전달할 추가 인수입니다.

runUtil IRunUtil: 명령어를 실행하는 IRunUtil입니다.

timeout long: 가져오기가 완료되는 데 걸린 시간(밀리초)

remoteFilePath String: 파일을 찾을 원격 경로입니다.

localFile File: 원격 파일이 가져올 로컬 ERROR(/File)입니다.

반환 값
boolean 성공하면 true를 반환하고 그렇지 않으면 false를 반환합니다.