summaryrefslogtreecommitdiff
path: root/libmat2/harmless.py
blob: 9032caf9201ab1032c0068caea50a633ea5f9b41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import shutil
from typing import Dict
from . import abstract


class HarmlessParser(abstract.AbstractParser):
    """ This is the parser for filetypes that do not contain metadata. """
    mimetypes = {'text/plain', }

    def get_meta(self) -> Dict[str, str]:
        return dict()

    def remove_all(self) -> bool:
        shutil.copy(self.filename, self.output_filename)
        return True