Move this to ConnectionFileMixin.