'Set folder size if folder'

def set_folder_size(self):

    if (self.is_folder and (not self.is_new())):
        self.file_size = self.get_folder_size()
        self.db_set(u'file_size', self.file_size)
        for folder in self.get_ancestors():
            frappe.db.set_value(u'File', folder, u'file_size', self.get_folder_size(folder))
