|
class Document:
|
|
def __init__(self, file_path):
|
|
self.file_path = file_path
|
|
self.content = ""
|
|
|
|
def load(self):
|
|
with open(self.file_path, 'r') as file:
|
|
self.content = file.read()
|
|
|
|
def save(self, target_path):
|
|
with open(target_path, 'w') as file:
|
|
file.write(self.content) |