24 lines
568 B
Python
24 lines
568 B
Python
from mcpacker.model.modpack import ModPack
|
|
from pathlib import Path
|
|
from typing import Self
|
|
|
|
import os
|
|
import shutil
|
|
|
|
|
|
# Class ############################################################################################
|
|
|
|
class Writer:
|
|
|
|
def __init__(self, pack:ModPack, outputDir:Path):
|
|
self.pack = pack
|
|
self.outputDir = outputDir
|
|
|
|
def resetOutputFile(self, file:Path):
|
|
if file.exists():
|
|
os.remove(file)
|
|
file.parent.mkdir(parents=True, exist_ok=True)
|
|
|
|
def write(self) -> Self:
|
|
raise NotImplementedError()
|