pgcontents/hybridmanager.py
def get(self, path, content=True, type=None, format=None):
        """
        Special case handling for listing root dir.
        """
        path = normalize_api_path(path)
        if path:
            return self.__get(path, content=content, type=type, format=format)
        if not content:
            return base_directory_model('')

        extra_content = self._extra_root_dirs()
        rm = self.root_manager
        if rm is None:
            root_model = base_directory_model('')
            root_model.update(
                format='json',
                content=extra_content,
            )
        else:
            root_model = rm.get(
                path,
                content=content,
                type=type,
                format=format,
            )
            # Append the extra directories.
            root_model['content'].extend(extra_content)
        return root_model
def get(self, path, content=True, type=None, format=None):
        path = normalize_api_path(path)
        if path:
            return self.__get(path, content=content, type=type, format=format)
        if not content:
            return base_directory_model('')

        extra_content = self._extra_root_dirs()
        rm = self.root_manager
        if rm is None:
            root_model = base_directory_model('')
            root_model.update(
                format='json',
                content=extra_content,
            )
        else:
            root_model = rm.get(
                path,
                content=content,
                type=type,
                format=format,
            )
            # Append the extra directories.
            root_model['content'].extend(extra_content)
        return root_model
def get ( self , path , content = True , type = None , format = None ) : path = normalize_api_path ( path ) if path : return self . __get ( path , content = content , type = type , format = format ) if not content : return base_directory_model ( '' ) extra_content = self . _extra_root_dirs ( ) rm = self . root_manager if rm is None : root_model = base_directory_model ( '' ) root_model . update ( format = 'json' , content = extra_content , ) else : root_model = rm . get ( path , content = content , type = type , format = format , ) # Append the extra directories. root_model [ 'content' ] . extend ( extra_content ) return root_model
Special case handling for listing root dir.
Special case handling for listing root dir .