trains/storage/helper.py
def list(self, prefix=None):
        """
        List entries in the helper base path.
        
        Return a list of names inside this helper base path. The base path is
        determined at creation time and is specific for each storage medium.
        For Google Storage and S3 it is the bucket of the path.
        For local files it is the root directory.
        
        This operation is not supported for http and https protocols.
        
        :param prefix: If None, return the list as described above. If not, it
            must be a string - the path of a sub directory under the base path.
            the returned list will include only objects under that subdir.
            
        :return: List of strings - the paths of all the objects in the storage base
            path under prefix. Listed relative to the base path.
            
        """
        
        if prefix:
            if prefix.startswith(self._base_url):
                prefix = prefix[len(self.base_url):].lstrip("/")
                
            try:
                res = self._driver.list_container_objects(self._container, ex_prefix=prefix)
            except TypeError:
                res = self._driver.list_container_objects(self._container)

            return [
                obj.name
                for obj in res if
                obj.name.startswith(prefix) and obj.name != prefix
            ]
        else:
            return [obj.name for obj in self._driver.list_container_objects(self._container)]

        List entries in the helper base path.
        
        Return a list of names inside this helper base path. The base path is
        determined at creation time and is specific for each storage medium.
        For Google Storage and S3 it is the bucket of the path.
        For local files it is the root directory.
        
        This operation is not supported for http and https protocols.
        
        :param prefix: If None, return the list as described above. If not, it
            must be a string - the path of a sub directory under the base path.
            the returned list will include only objects under that subdir.
            
        :return: List of strings - the paths of all the objects in the storage base
            path under prefix. Listed relative to the base path.
            
        
List entries in the helper base path.
Return a list of names inside this helper base path. The base path is
determined at creation time and is specific for each storage medium.
For Google Storage and S3 it is the bucket of the path.
For local files it is the root directory.

This operation is not supported for http and https protocols.
List entries in the helper base path . Return a list of names inside this helper base path . The base path is determined at creation time and is specific for each storage medium . For Google Storage and S3 it is the bucket of the path . For local files it is the root directory . This operation is not supported for http and https protocols .
def list(self, prefix=None):
        if prefix:
            if prefix.startswith(self._base_url):
                prefix = prefix[len(self.base_url):].lstrip("/")
            try:
                res = self._driver.list_container_objects(self._container, ex_prefix=prefix)
            except TypeError:
                res = self._driver.list_container_objects(self._container)
            return [
                obj.name
                for obj in res if
                obj.name.startswith(prefix) and obj.name != prefix
            ]
        else:
            return [obj.name for obj in self._driver.list_container_objects(self._container)]
def list ( self , prefix = None ) : if prefix : if prefix . startswith ( self . _base_url ) : prefix = prefix [ len ( self . base_url ) : ] . lstrip ( "/" ) try : res = self . _driver . list_container_objects ( self . _container , ex_prefix = prefix ) except TypeError : res = self . _driver . list_container_objects ( self . _container ) return [ obj . name for obj in res if obj . name . startswith ( prefix ) and obj . name != prefix ] else : return [ obj . name for obj in self . _driver . list_container_objects ( self . _container ) ]
List entries in the helper base path.
List entries in the helper base path .
"""
        List entries in the helper base path.
        
        Return a list of names inside this helper base path. The base path is
        determined at creation time and is specific for each storage medium.
        For Google Storage and S3 it is the bucket of the path.
        For local files it is the root directory.
        
        This operation is not supported for http and https protocols.
        
        :param prefix: If None, return the list as described above. If not, it
            must be a string - the path of a sub directory under the base path.
            the returned list will include only objects under that subdir.
            
        :return: List of strings - the paths of all the objects in the storage base
            path under prefix. Listed relative to the base path.
            
        """
List of strings - the paths of all the objects in the storage base
path under prefix. Listed relative to the base path.
List of strings - the paths of all the objects in the storage base path under prefix . Listed relative to the base path .
self
prefix
If None, return the list as described above. If not, it
must be a string - the path of a sub directory under the base path.
the returned list will include only objects under that subdir.
If None return the list as described above . If not it must be a string - the path of a sub directory under the base path . the returned list will include only objects under that subdir .