2026-08-25 19:14:07 -06:00

24 lines
425 B
Python

class FileUtil:
@staticmethod
def saveToFile(string, filepath):
with open(filepath, "w") as f:
f.write(string)
@staticmethod
def appendToFile(string, filepath):
with open(filepath, "a") as f:
f.write(string)
@staticmethod
def readFromFile(filepath):
file = open(filepath, 'r')
text = file.read()
file.close()
return text