'Return the size in bytes of the file represented by the specified
canonical name. Automatically handles dirtied parsed objects. See also:
:meth:`parsed`'

def filesize(self, name):

    if (name in self.dirtied):
        self.commit_item(name, keep_parsed=True)
    path = self.name_to_abspath(name)
    return os.path.getsize(path)
