
class FilesOperater():
    def read(file:str, seperator=None):
        try:
            f = open(file,"r")
            rd = f.read()
            f.close()
            return rd.split(seperator)
        except Exception as e:
            return f"Exception Occured: {e}"

    
    def write(file:str, content):
        try:
            f = open(file,"w")
            f.write(content\n)
            f.close()
            return f"File \"{file}\" has been formatted successfully."
        except Exception as e:
            return f"Exception Occured: {e}"

    def edit(file:str, content):
        try:
            f = open(file,"a")
            f.write(content\n)
            f.close()
            return f"File \"{file}\" has been Edited Successfully."
        except Exception as e:
            return f"Exception Occured: {e}"
