def METHOD_NAME(self, filename):
    extension_dirs = {
        '.md': '',
        '.txt': '',
        '.js': 'files/scripts',
        '.html': 'templates',
        '.xslt': 'templates',
        '': '',
    }
    dirname = extension_dirs.get(Path(filename).suffix,'files/resources')
    if not filename.startswith(dirname):
        filename = Path(dirname) / filename
    return str(filename)