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

Public Member Functions

def __init__ (self, data_store_location)
 
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 530 of file webpages_playback.py.

Constructor & Destructor Documentation

◆ __init__()

def webpages_playback.LocalFileSystemDataStore.__init__ (   self,
  data_store_location 
)

Definition at line 531 of file webpages_playback.py.

531 def __init__(self, data_store_location):
532 self._base_dir = data_store_location

Member Function Documentation

◆ delete_path()

def webpages_playback.LocalFileSystemDataStore.delete_path (   self,
  path 
)

Definition at line 539 of file webpages_playback.py.

539 def delete_path(self, path):
540 shutil.rmtree(path)

◆ does_storage_object_exist()

def webpages_playback.LocalFileSystemDataStore.does_storage_object_exist (   self,
  name 
)

Reimplemented from webpages_playback.DataStore.

Definition at line 537 of file webpages_playback.py.

537 def does_storage_object_exist(self, name):
538 return os.path.isfile(os.path.join(self._base_dir, name))

◆ download_file()

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

Reimplemented from webpages_playback.DataStore.

Definition at line 541 of file webpages_playback.py.

541 def download_file(self, name, local_path):
542 shutil.copyfile(os.path.join(self._base_dir, name), local_path)

◆ target_name()

def webpages_playback.LocalFileSystemDataStore.target_name (   self)

Reimplemented from webpages_playback.DataStore.

Definition at line 533 of file webpages_playback.py.

533 def target_name(self):
534 return self._base_dir

◆ target_type()

def webpages_playback.LocalFileSystemDataStore.target_type (   self)

Reimplemented from webpages_playback.DataStore.

Definition at line 535 of file webpages_playback.py.

535 def target_type(self):
536 return self._base_dir

◆ upload_dir_contents()

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

Reimplemented from webpages_playback.DataStore.

Definition at line 543 of file webpages_playback.py.

543 def upload_dir_contents(self, source_dir, dest_dir):
544 def copytree(source_dir, dest_dir):
545 if not os.path.exists(dest_dir):
546 os.makedirs(dest_dir)
547 for item in os.listdir(source_dir):
548 source = os.path.join(source_dir, item)
549 dest = os.path.join(dest_dir, item)
550 if os.path.isdir(source):
551 copytree(source, dest)
552 else:
553 shutil.copy2(source, dest)
554 copytree(source_dir, os.path.join(self._base_dir, dest_dir))
555

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