Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
webpages_playback.GoogleStorageDataStore Class Reference
Inheritance diagram for webpages_playback.GoogleStorageDataStore:
webpages_playback.DataStore

Public Member Functions

def __init__ (self, data_store_url)
 
def target_name (self)
 
def target_type (self)
 
def does_storage_object_exist (self, name)
 
def delete_path (self, path)
 
def download_file (self, name, local_path)
 
def upload_dir_contents (self, source_dir, dest_dir)
 
def target_name (self)
 
def target_type (self)
 
def does_storage_object_exist (self, name)
 
def download_file (self, name, local_path)
 
def upload_dir_contents (self, source_dir, dest_dir)
 

Detailed Description

Definition at line 498 of file webpages_playback.py.

Constructor & Destructor Documentation

◆ __init__()

def webpages_playback.GoogleStorageDataStore.__init__ (   self,
  data_store_url 
)

Definition at line 499 of file webpages_playback.py.

499 def __init__(self, data_store_url):
500 self._url = data_store_url.rstrip('/')
501

Member Function Documentation

◆ delete_path()

def webpages_playback.GoogleStorageDataStore.delete_path (   self,
  path 
)

Definition at line 518 of file webpages_playback.py.

518 def delete_path(self, path):
519 subprocess.check_call(['gsutil', 'rm', '-r', '/'.join((self._url, path))])
520
static SkString join(const CommandLineFlags::StringArray &)
Definition: skpbench.cpp:741

◆ does_storage_object_exist()

def webpages_playback.GoogleStorageDataStore.does_storage_object_exist (   self,
  name 
)

Reimplemented from webpages_playback.DataStore.

Definition at line 508 of file webpages_playback.py.

508 def does_storage_object_exist(self, name):
509 try:
510 output = subprocess.check_output([
511 'gsutil', 'ls', '/'.join((self._url, name))])
512 except subprocess.CalledProcessError:
513 return False
514 if len(output.splitlines()) != 1:
515 return False
516 return True
517

◆ download_file()

def webpages_playback.GoogleStorageDataStore.download_file (   self,
  name,
  local_path 
)

Reimplemented from webpages_playback.DataStore.

Definition at line 521 of file webpages_playback.py.

521 def download_file(self, name, local_path):
522 subprocess.check_call([
523 'gsutil', 'cp', '/'.join((self._url, name)), local_path])
524

◆ target_name()

def webpages_playback.GoogleStorageDataStore.target_name (   self)

Reimplemented from webpages_playback.DataStore.

Definition at line 502 of file webpages_playback.py.

502 def target_name(self):
503 return self._url
504

◆ target_type()

def webpages_playback.GoogleStorageDataStore.target_type (   self)

Reimplemented from webpages_playback.DataStore.

Definition at line 505 of file webpages_playback.py.

505 def target_type(self):
506 return 'Google Storage'
507

◆ upload_dir_contents()

def webpages_playback.GoogleStorageDataStore.upload_dir_contents (   self,
  source_dir,
  dest_dir 
)

Reimplemented from webpages_playback.DataStore.

Definition at line 525 of file webpages_playback.py.

525 def upload_dir_contents(self, source_dir, dest_dir):
526 subprocess.check_call([
527 'gsutil', 'cp', '-r', source_dir, '/'.join((self._url, dest_dir))])
528
529

The documentation for this class was generated from the following file: