GCSFileDownloader

public class GCSFileDownloader
extends GCSFileDownloaderBase implements IFileDownloader

java.lang.অবজেক্ট
com.android.tradefed.util.gcs.GCSCommon
com.android.tradefed.util.gcs.GCSFileDownloaderBase
com.android.tradefed.util.GCSFileDownloader


গুগল ক্লাউড স্টোরেজ (GCS) থেকে ফাইল ডাউনলোড করতে ফাইল ডাউনলোডার।

সারাংশ

পাবলিক কনস্ট্রাক্টর

GCSFileDownloader ()
GCSFileDownloader (Boolean createEmptyFile)
GCSFileDownloader (File jsonKeyFile)
GCSFileDownloader (File jsonKeyFile, Boolean createEmptyFile)

পাবলিক পদ্ধতি

static File createTempFileForRemote (String remoteFilePath, File rootDir)
void downloadFile (String remotePath, File destFile)
File downloadFile (String remoteFilePath)

GCS থেকে ফাইল ডাউনলোড করুন।

boolean isFresh (File localFile, String remotePath)

স্থানীয় ফাইলের তাজাতা পরীক্ষা করুন।

সুরক্ষিত পদ্ধতি

void clearCache ()
void downloadFile (String bucketName, String remoteFilename, File localFile)
Storage getStorage ( scopes)

TF বিকল্পের উপর ভিত্তি করে শংসাপত্র সমর্থন করতে বেস-এ বাস্তবায়ন ওভাররাইড করুন।

String[] parseGcsPath (String remotePath)

পাবলিক কনস্ট্রাক্টর

GCSFileDownloader

public GCSFileDownloader ()

GCSFileDownloader

public GCSFileDownloader (Boolean createEmptyFile)

পরামিতি
createEmptyFile Boolean

GCSFileDownloader

public GCSFileDownloader (File jsonKeyFile)

পরামিতি
jsonKeyFile File

GCSFileDownloader

public GCSFileDownloader (File jsonKeyFile, 
                Boolean createEmptyFile)

পরামিতি
jsonKeyFile File

createEmptyFile Boolean

পাবলিক পদ্ধতি

CreateTempFileForRemote

public static File createTempFileForRemote (String remoteFilePath, 
                File rootDir)

পরামিতি
remoteFilePath String

rootDir File

রিটার্নস
File

নিক্ষেপ করে
BuildRetrievalError

ডাউনলোড ফাইল

public void downloadFile (String remotePath, 
                File destFile)

পরামিতি
remotePath String

destFile File

নিক্ষেপ করে
BuildRetrievalError

ডাউনলোড ফাইল

public File downloadFile (String remoteFilePath)

GCS থেকে ফাইল ডাউনলোড করুন।

এই মুহূর্তে শুধুমাত্র GCS পাথ সমর্থন করে।

পরামিতি
remoteFilePath String : gs://bucket/file/path বিন্যাস GCS পাথ।

রিটার্নস
File স্থানীয় ফাইল

নিক্ষেপ করে
com.android.tradefed.build.BuildRetrievalError
BuildRetrievalError

তাজা

public boolean isFresh (File localFile, 
                String remotePath)

স্থানীয় ফাইলের তাজাতা পরীক্ষা করুন। যদি স্থানীয় ফাইলটি দূরবর্তী ফাইলের মতো হয় তবে এটি তাজা। যদি না হয়, স্থানীয় ফাইল বাসি হয়. এটি প্রধানত ক্যাশে ব্যবহার করা হয়। ডিফল্ট বাস্তবায়ন সর্বদা সত্য ফিরে আসবে, তাই যদি ফাইলটি অপরিবর্তনীয় হয় তবে এটির তাজাতা পরীক্ষা করার প্রয়োজন হবে না।

পরামিতি
localFile File : স্থানীয় ফাইল।

remotePath String : দূরবর্তী ফাইল পাথ।

রিটার্নস
boolean স্থানীয় ফাইল তাজা হলে সত্য, অন্যথায় মিথ্যা।

নিক্ষেপ করে
BuildRetrievalError

সুরক্ষিত পদ্ধতি

সাফ ক্যাশে

protected void clearCache ()

ডাউনলোড ফাইল

protected void downloadFile (String bucketName, 
                String remoteFilename, 
                File localFile)

পরামিতি
bucketName String

remoteFilename String

localFile File

নিক্ষেপ করে
BuildRetrievalError

স্টোরেজ পান

protected Storage getStorage ( scopes)

TF বিকল্পের উপর ভিত্তি করে শংসাপত্র সমর্থন করতে বেস-এ বাস্তবায়ন ওভাররাইড করুন।

পরামিতি
scopes : শংসাপত্রের জন্য অনুরোধ করার জন্য নির্দিষ্ট সুযোগ।

রিটার্নস
Storage GCS বাকেটের Storage অবজেক্ট

নিক্ষেপ করে
IOException

parseGcsPath

protected String[] parseGcsPath (String remotePath)

পরামিতি
remotePath String

রিটার্নস
String[]

নিক্ষেপ করে
BuildRetrievalError