framework/pddl/helper/fs.py

20 lines
413 B
Python
Raw Normal View History

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