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


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

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

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