framework/pddl/helper/fs.py

18 lines
321 B
Python
Raw Normal View History

2023-03-05 16:58:37 +03:00
import os
import json
class FS:
def readJSON(path:str):
return json.loads((open(path)).read())
def writeFile(data, filePath, fileName):
file_to_open = filePath + fileName
f = open(file_to_open, 'w', )
f.write(data)
2023-03-06 17:23:04 +03:00
def readFile(path:str):
return open(path).read()