'''Handler for /img/ directories and their contents'''

from ..contract import AbstractHandler

class Handler(AbstractHandler):
    '''State and behavior for image directory handling'''
    def __init__(self, io_provider):
        self.io_provider = io_provider
        return

    def write(self, document):
        self.io_provider.copy_directory(document.get_file_name(path=True,name=False,extension=False), document.get_file_name(path=True,name=False,extension=False))
        return
    
    def appraise(self, document):
        name = document.get_file_name(path=False,extension=False)
        if name == "img" or name == "images":
            document.children = []
            self.write(document)
            document.parent.children.remove(document)
            return 1
        else:
            return 0
        return

    def init_static(self):
        return
    
    def prep_metadata(self, document):
        return

    def get_primary_url(self, document):
        return

    def get_summary(self, document):
        return

    def get_date(self, document):
        return

    def get_authors(self, document):
        return

    def get_name(self, document):
        return

    def get_listing_html_tile(self, document):
        return

    def get_listing_html_line(self, document):
        return

    def doc_prefers_tile(self, document):
        return

