class_docstr: StorageManager is helper interface for downloading & uploading files to supported remote storage
  Support remote servers: http(s)/S3/GS/Azure/File-System-Folder
  Cache is enabled by default for all downloaded remote urls/files
docstr: Return a list of object names inside the base path or dictionaries containing the corresponding
  objects' metadata (in case `with_metadata` is True)
  
  :param str remote_url: The base path.
      For Google Storage, Azure and S3 it is the bucket of the path, for local files it is the root directory.
      For example: AWS S3: `s3://bucket/folder_` will list all the files you have in
      `s3://bucket-name/folder_*/*`. The same behaviour with Google Storage: `gs://bucket/folder_`,
      Azure blob storage: `azure://bucket/folder_` and also file system listing: `/mnt/share/folder_`
  :param bool return_full_path: If True, return a list of full object paths, otherwise return a list of
      relative object paths (default False).
  :param with_metadata: Instead of returning just the names of the objects, return a list of dictionaries
      containing the name and metadata of the remote file. Thus, each dictionary will contain the following
      keys: `name`, `size`.
      `return_full_path` will modify the name of each dictionary entry to the full path.
  
  :return: The paths of all the objects the storage base path under prefix or the dictionaries containing the objects' metadata, relative to the base path.
      None in case of list operation is not supported (http and https protocols for example)
docstr_tok: ["Return","a","list","of","object","names","inside","the","base","path","or","dictionaries","containing","the","corresponding","objects","'","metadata","(","in","case","`","with_metadata","`","is","True",")",":","param","str","remote_url",":","The","base","path",".","For","Google","Storage",",","Azure","and","S3","it","is","the","bucket","of","the","path",",","for","local","files","it","is","the","root","directory",".","For","example",":","AWS","S3",":","`","s3",":","\/\/bucket\/folder_","`","will","list","all","the","files","you","have","in","`","s3",":","\/\/bucket-name\/folder_","*","\/","*","`",".","The","same","behaviour","with","Google","Storage",":","`","gs",":","\/\/bucket\/folder_","`",",","Azure","blob","storage",":","`","azure",":","\/\/bucket\/folder_","`","and","also","file","system","listing",":","`","\/mnt\/share\/folder_","`",":","param","bool","return_full_path",":","If","True",",","return","a","list","of","full","object","paths",",","otherwise","return","a","list","of","relative","object","paths","(","default","False",")",".",":","param","with_metadata",":","Instead","of","returning","just","the","names","of","the","objects",",","return","a","list","of","dictionaries","containing","the","name","and","metadata","of","the","remote","file",".","Thus",",","each","dictionary","will","contain","the","following","keys",":","`","name","`",",","`","size","`",".","`","return_full_path","`","will","modify","the","name","of","each","dictionary","entry","to","the","full","path",".",":","return",":","The","paths","of","all","the","objects","the","storage","base","path","under","prefix","or","the","dictionaries","containing","the","objects","'","metadata",",","relative","to","the","base","path",".","None","in","case","of","list","operation","is","not","supported","(","http","and","https","protocols","for","example",")"]
code: def list(
      cls, remote_url, return_full_path=False, with_metadata=False
  ):
      # type: (str, bool, bool) -> Optional[List[Union[str, dict]]]
      """
      Return a list of object names inside the base path or dictionaries containing the corresponding
      objects' metadata (in case `with_metadata` is True)
  
      :param str remote_url: The base path.
          For Google Storage, Azure and S3 it is the bucket of the path, for local files it is the root directory.
          For example: AWS S3: `s3://bucket/folder_` will list all the files you have in
          `s3://bucket-name/folder_*/*`. The same behaviour with Google Storage: `gs://bucket/folder_`,
          Azure blob storage: `azure://bucket/folder_` and also file system listing: `/mnt/share/folder_`
      :param bool return_full_path: If True, return a list of full object paths, otherwise return a list of
          relative object paths (default False).
      :param with_metadata: Instead of returning just the names of the objects, return a list of dictionaries
          containing the name and metadata of the remote file. Thus, each dictionary will contain the following
          keys: `name`, `size`.
          `return_full_path` will modify the name of each dictionary entry to the full path.
  
      :return: The paths of all the objects the storage base path under prefix or the dictionaries containing the objects' metadata, relative to the base path.
          None in case of list operation is not supported (http and https protocols for example)
      """
      helper = StorageHelper.get(remote_url)
      try:
          helper_list_result = helper.list(
              prefix=remote_url, with_metadata=with_metadata
          )
      except Exception as ex:
          LoggerRoot.get_base_logger().warning(
              "Can not list files for '{}' - {}".format(remote_url, ex)
          )
          return None
  
      prefix = (
          remote_url.rstrip("/")
          if helper.base_url == "file://"
          else helper.base_url
      )
      if not with_metadata:
          return (
              [
                  "{}/{}".format(prefix, name)
                  for name in helper_list_result
              ]
              if return_full_path
              else helper_list_result
          )
      else:
          if return_full_path:
              for obj in helper_list_result:
                  obj["name"] = "{}/{}".format(prefix, obj.get("name"))
          return helper_list_result
  
imports: import fnmatch
  import shutil
  import tarfile
  from multiprocessing.pool import ThreadPool
  from random import random
  from time import time
  from typing import List, Optional, Union
  from zipfile import ZipFile
  from pathlib2 import Path
  from .cache import CacheManager
  from .callbacks import ProgressReport
  from .helper import StorageHelper
  from .util import encode_string_to_filename, safe_extract, create_zip_directories
  from ..debugging.log import LoggerRoot
  from ..config import deferred_config
label_desc: Use image node_id 11 for calling the StorageManager obj's underlying member method code with example usage: obj.list(cls, remote_url, return_full_path, with_metadata) and returns: unknown, helper_list_result, None