

class Users:
    __pub_folder = None
    __username = None
    __auth_file = None
    __auth_method = None
    
    def __init__(self, username, public_path, auth_file):
        self.__username = username
        self.__pub_folder = public_path + '/' +username
        if auth_file != None:
            self.__auth_file = auth_file
            self.__auth_method = "file"
x
    def getPasswd(self, username):
        with open(self.auth_file, 'r') as f:
            users_info = f.readlines()

        for userinfo in users_info:
            user = userinfo.split(':', maxsplit=1)[0]
            passwd = userinfo.split(':', maxsplit=1)[1]
            if user == username:
                return passwd

        return None

    def getPubfolder:
        return __pub_folder

    def getUsername:
        return __username
