def getHomeDirectory(self, avatarId):
        """
        Return the system-defined home directory of the system user account with
        the name C{avatarId}.
        """
        path = os.path.expanduser('~' + avatarId)
        if path.startswith('~'):
            raise cred_error.UnauthorizedLogin()
        return filepath.FilePath(path)

        Return the system-defined home directory of the system user account with
        the name C{avatarId}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/ftp.py