30 lines
727 B
Python
30 lines
727 B
Python
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
############################################
|
||
|
# Directory-Getter module abstract classes #
|
||
|
############################################
|
||
|
|
||
|
# Imports
|
||
|
from abc import ABC, abstractmethod
|
||
|
from tubot.static.abc import IValidatable
|
||
|
from tubot.dirgetter.types import GetterTypes
|
||
|
|
||
|
|
||
|
class DirGetter(IValidatable, ABC):
|
||
|
|
||
|
_gtype: GetterTypes
|
||
|
|
||
|
def __init__(self) -> None:
|
||
|
if self._gtype is None:
|
||
|
raise NotImplementedError("DirGetter type is not implemented")
|
||
|
|
||
|
@property
|
||
|
@abstractmethod
|
||
|
async def folders(self) -> dict:
|
||
|
"""
|
||
|
Returns a dictionary of media folders {name: path}
|
||
|
|
||
|
:return: Dict of media folders
|
||
|
"""
|
||
|
raise NotImplementedError
|