# Path: studio/storage/storage_type.py
# class StorageType(Enum):
#     storageHTTP = 1
#     storageS3 = 2
#     storageLocal = 3
#     storageFirebase = 4
#     storageDockerHub = 5
#     storageSHub = 6
# 
#     storageInvalid = 99
# 
# Path: studio/util/util.py
# def get_temp_filename() -> str:
#     return os.path.join(tempfile.gettempdir(), str(uuid.uuid4()))
# 
# def check_for_kb_interrupt():
#     current_exc = sys.exc_info()[1]
#     if current_exc is None:
#         return
#     if isinstance(current_exc, KeyboardInterrupt):
#         raise current_exc
#     return


import os
import uuid
import time
from typing import Dict
from studio.storage.storage_type import StorageType
from studio.util.util import get_temp_filename, check_for_kb_interrupt

    def download_remote_path(self, remote_path, local_path):
        raise NotImplementedError("Not implemented: download_remote_path")

    def delete_file(self, key, shallow=True):
        raise NotImplementedError("Not implemented: delete_file")

    def get_file_url(self, key, method='GET'):
        raise NotImplementedError("Not implemented: get_file_url")

    def get_file_timestamp(self, key):
        raise NotImplementedError("Not implemented: get_file_timestamp")

    def get_qualified_location(self, key):
        raise NotImplementedError("Not implemented: get_qualified_location")

    def get_local_destination(self, remote_path: str):
        raise NotImplementedError("Not implemented: get_local_destination")

    def get_timestamp_shift(self):
        return self._timestamp_shift

    def get_compression(self):
        return self.compression

    def cleanup(self):
        pass

    def _measure_timestamp_diff(self):
        max_diff = 60

# Path: studio/storage/storage_type.py
# class StorageType(Enum):
#     storageHTTP = 1
#     storageS3 = 2
#     storageLocal = 3
#     storageFirebase = 4
#     storageDockerHub = 5
#     storageSHub = 6
# 
#     storageInvalid = 99
# 
# Path: studio/util/util.py
# def get_temp_filename() -> str:
#     return os.path.join(tempfile.gettempdir(), str(uuid.uuid4()))
# 
# def check_for_kb_interrupt():
#     current_exc = sys.exc_info()[1]
#     if current_exc is None:
#         return
#     if isinstance(current_exc, KeyboardInterrupt):
#         raise current_exc
#     return


# Path: studio/storage/storage_handler.py
import os
import uuid
import time
from typing import Dict
from studio.storage.storage_type import StorageType
from studio.util.util import get_temp_filename, check_for_kb_interrupt


    def download_remote_path(self, remote_path, local_path):
        raise NotImplementedError("Not implemented: download_remote_path")

    def delete_file(self, key, shallow=True):
        raise NotImplementedError("Not implemented: delete_file")

    def get_file_url(self, key, method='GET'):
        raise NotImplementedError("Not implemented: get_file_url")

    def get_file_timestamp(self, key):
        raise NotImplementedError("Not implemented: get_file_timestamp")

    def get_qualified_location(self, key):
        raise NotImplementedError("Not implemented: get_qualified_location")

    def get_local_destination(self, remote_path: str):
        raise NotImplementedError("Not implemented: get_local_destination")

    def get_timestamp_shift(self):
        return self._timestamp_shift

    def get_compression(self):
        return self.compression

    def cleanup(self):
        pass

    def _measure_timestamp_diff(self):
        max_diff = 60

        tmpfile = get_temp_filename() + '.txt'