GCSFileUploader

public class GCSFileUploader
extends GCSCommon

java.lang.Object
   ↳ com.android.tradefed.util.gcs.GCSCommon
     ↳ com.android.tradefed.util.GCSFileUploader


أداة تحميل الملفات لتحميل بيانات الملفات إلى Google Cloud Storage (GCS)

ملخّص

وظائف الإنشاء العامة

GCSFileUploader()
GCSFileUploader(File jsonKeyFile)

الطرق العامة

void uploadFile(String bucketName, String gcsFilename, InputStream fileContents, String contentType, boolean allowOverwrite)

حمِّل البيانات إلى ملف حزمة GCS.

الطرق المحمية

Storage getStorage( scopes)

يمكنك إلغاء التنفيذ في القاعدة لتفعيل بيانات الاعتماد استنادًا إلى خيارات TF.

وظائف الإنشاء العامة

GCSFileUploader

public GCSFileUploader ()

GCSFileUploader

public GCSFileUploader (File jsonKeyFile)

المعلمات
jsonKeyFile File

الطرق العامة

uploadFile

public void uploadFile (String bucketName, 
                String gcsFilename, 
                InputStream fileContents, 
                String contentType, 
                boolean allowOverwrite)

تحميل البيانات إلى ملف حزمة GCS: gs://[bucketName]/[gcsFileName]

المعلمات
bucketName String: اسم حزمة GCS

gcsFilename String: اسم الملف

fileContents InputStream: InputStream للبيانات التي سيتم كتابتها في ملف GCS

contentType String: هو نوع وسائط MIME للعنصر الذي يتم تحميله.

allowOverwrite boolean: سيسمح الخيار "صحيح" لهذه الطريقة بإعادة كتابة ملف على GCS.

الطرق المحمية

getStorage

protected Storage getStorage ( scopes)

يمكنك إلغاء التنفيذ في القاعدة لتفعيل بيانات الاعتماد استنادًا إلى خيارات TF.

المعلمات
scopes : نطاقات محدّدة لطلب بيانات الاعتماد لها

المرتجعات
Storage عنصر Storage لحزمة GCS

عمليات الرمي
IOException